Module Name:    src
Committed By:   msaitoh
Date:           Thu Jun  4 09:44:57 UTC 2015

Modified Files:
        src/sys/net [netbsd-7]: if_gif.c

Log Message:
Pull up following revision(s) (requested by hsuenaga in ticket #822):
        sys/net/if_gif.c: revision 1.85
        sys/net/if_gif.c: revision 1.86
Obtain softnet_lock before entering IP networking stack from gif software
interrupt.
Include <sys/socketvar.h> for softnet_lock.


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.83.2.1 src/sys/net/if_gif.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/if_gif.c
diff -u src/sys/net/if_gif.c:1.83 src/sys/net/if_gif.c:1.83.2.1
--- src/sys/net/if_gif.c:1.83	Thu Jun  5 23:48:16 2014
+++ src/sys/net/if_gif.c	Thu Jun  4 09:44:57 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_gif.c,v 1.83 2014/06/05 23:48:16 rmind Exp $	*/
+/*	$NetBSD: if_gif.c,v 1.83.2.1 2015/06/04 09:44:57 msaitoh 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.83 2014/06/05 23:48:16 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.83.2.1 2015/06/04 09:44:57 msaitoh Exp $");
 
 #include "opt_inet.h"
 
@@ -44,6 +44,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1
 #include <sys/errno.h>
 #include <sys/ioctl.h>
 #include <sys/time.h>
+#include <sys/socketvar.h>
 #include <sys/syslog.h>
 #include <sys/proc.h>
 #include <sys/protosw.h>
@@ -344,12 +345,16 @@ gifintr(void *arg)
 		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:

Reply via email to