Module Name: src Committed By: bouyer Date: Sat Sep 5 13:58:48 UTC 2009
Modified Files: src/sys/netinet [netbsd-4]: 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.2.2 -r1.129.2.3 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.2.2 src/sys/netinet/tcp_usrreq.c:1.129.2.3 --- src/sys/netinet/tcp_usrreq.c:1.129.2.2 Tue Jan 29 22:37:44 2008 +++ src/sys/netinet/tcp_usrreq.c Sat Sep 5 13:58:48 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_usrreq.c,v 1.129.2.2 2008/01/29 22:37:44 pavel Exp $ */ +/* $NetBSD: tcp_usrreq.c,v 1.129.2.3 2009/09/05 13:58:48 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.2.2 2008/01/29 22:37:44 pavel Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.129.2.3 2009/09/05 13:58:48 bouyer Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -1323,6 +1323,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); @@ -1355,6 +1356,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; @@ -1477,6 +1479,7 @@ elem_count--; } } + splx(s); *oldlenp = needed; if (oldp == NULL)