Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net Obtain softnet_lock before entering IP networking st...
details: https://anonhg.NetBSD.org/src/rev/0fbba2ebb868
branches: trunk
changeset: 338649:0fbba2ebb868
user: hsuenaga <hsuenaga%NetBSD.org@localhost>
date: Wed Jun 03 02:17:51 2015 +0000
description:
Obtain softnet_lock before entering IP networking stack from gif software
interrupt.
diffstat:
sys/net/if_gif.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (35 lines):
diff -r 80020c9a9fb9 -r 0fbba2ebb868 sys/net/if_gif.c
--- a/sys/net/if_gif.c Tue Jun 02 23:00:25 2015 +0000
+++ b/sys/net/if_gif.c Wed Jun 03 02:17:51 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_gif.c,v 1.84 2015/04/20 10:19:54 roy Exp $ */
+/* $NetBSD: if_gif.c,v 1.85 2015/06/03 02:17:51 hsuenaga Exp $ */
/* $KAME: if_gif.c,v 1.76 2001/08/20 02:01:02 kjc Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.84 2015/04/20 10:19:54 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.85 2015/06/03 02:17:51 hsuenaga Exp $");
#include "opt_inet.h"
@@ -344,12 +344,16 @@
switch (sc->gif_psrc->sa_family) {
#ifdef INET
case AF_INET:
+ mutex_enter(softnet_lock);
error = in_gif_output(ifp, family, m);
+ mutex_exit(softnet_lock);
break;
#endif
#ifdef INET6
case AF_INET6:
+ mutex_enter(softnet_lock);
error = in6_gif_output(ifp, family, m);
+ mutex_exit(softnet_lock);
break;
#endif
default:
Home |
Main Index |
Thread Index |
Old Index