Module Name:    src
Committed By:   bouyer
Date:           Sat Sep  5 13:58:52 UTC 2009

Modified Files:
        src/sys/netinet [netbsd-4-0]: tcp_usrreq.c

Log Message:
Pull up following revision(s) (requested by mlelstv in ticket #1358):
        sys/netinet/tcp_usrreq.c: revision 1.148 via patch
Make the sysctl routines take raise to splnet() before dealing with
any data structures.


To generate a diff of this commit:
cvs rdiff -u -r1.129 -r1.129.8.1 src/sys/netinet/tcp_usrreq.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/netinet/tcp_usrreq.c
diff -u src/sys/netinet/tcp_usrreq.c:1.129 src/sys/netinet/tcp_usrreq.c:1.129.8.1
--- src/sys/netinet/tcp_usrreq.c:1.129	Fri Nov 10 13:19:16 2006
+++ src/sys/netinet/tcp_usrreq.c	Sat Sep  5 13:58:52 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_usrreq.c,v 1.129 2006/11/10 13:19:16 yamt Exp $	*/
+/*	$NetBSD: tcp_usrreq.c,v 1.129.8.1 2009/09/05 13:58:52 bouyer Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -102,7 +102,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.129 2006/11/10 13:19:16 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.129.8.1 2009/09/05 13:58:52 bouyer Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -1230,6 +1230,7 @@
 	u_int op, arg;
 	size_t len, needed, elem_size, out_size;
 	int error, elem_count, pf, proto, pf2;
+	int s;
 
 	if (namelen != 4)
 		return (EINVAL);
@@ -1262,6 +1263,7 @@
 	proto = oname[2];
 	pf2 = (oldp != NULL) ? pf : 0;
 
+	s = splnet();
 	CIRCLEQ_FOREACH(inph, &pcbtbl->inpt_queue, inph_queue) {
 #ifdef INET
 		inp = (const struct inpcb *)inph;
@@ -1384,6 +1386,7 @@
 				elem_count--;
 		}
 	}
+	splx(s);
 
 	*oldlenp = needed;
 	if (oldp == NULL)

Reply via email to