Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net Add missing splnet to if_deferred_start_common
details: https://anonhg.NetBSD.org/src/rev/5520128410f6
branches: trunk
changeset: 351954:5520128410f6
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Tue Mar 07 01:32:03 2017 +0000
description:
Add missing splnet to if_deferred_start_common
if_start should run in splnet to avoid running interrupt handlers.
diffstat:
sys/net/if.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (31 lines):
diff -r db5824142b07 -r 5520128410f6 sys/net/if.c
--- a/sys/net/if.c Tue Mar 07 01:28:37 2017 +0000
+++ b/sys/net/if.c Tue Mar 07 01:32:03 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if.c,v 1.381 2017/02/23 07:57:10 ozaki-r Exp $ */
+/* $NetBSD: if.c,v 1.382 2017/03/07 01:32:03 ozaki-r Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.381 2017/02/23 07:57:10 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.382 2017/03/07 01:32:03 ozaki-r Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@@ -1008,8 +1008,11 @@
static void
if_deferred_start_common(struct ifnet *ifp)
{
-
+ int s;
+
+ s = splnet();
if_start_lock(ifp);
+ splx(s);
}
static inline bool
Home |
Main Index |
Thread Index |
Old Index