Date: Tue, 18 Jul 2006 22:34:28 +0000 (UTC) From: Stephan Uphoff <ups@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/netinet in_pcb.c in_pcb.h ip_divert.c raw_ip.c tcp_subr.c tcp_usrreq.c udp_usrreq.c src/sys/netinet6 in6_pcb.c raw_ip6.c udp6_usrreq.c Message-ID: <200607182234.k6IMYSVp038774@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
ups 2006-07-18 22:34:28 UTC FreeBSD src repository Modified files: sys/netinet in_pcb.c in_pcb.h ip_divert.c raw_ip.c tcp_subr.c tcp_usrreq.c udp_usrreq.c sys/netinet6 in6_pcb.c raw_ip6.c udp6_usrreq.c Log: Fix race conditions on enumerating pcb lists by moving the initialization ( and where appropriate the destruction) of the pcb mutex to the init/finit functions of the pcb zones. This allows locking of the pcb entries and race condition free comparison of the generation count. Rearrange locking a bit to avoid extra locking operation to update the generation count in in_pcballoc(). (in_pcballoc now returns the pcb locked) I am planning to convert pcb list handling from a type safe to a reference count model soon. ( As this allows really freeing the PCBs) Reviewed by: rwatson@, mohans@ MFC after: 1 week Revision Changes Path 1.180 +9 -5 src/sys/netinet/in_pcb.c 1.89 +2 -1 src/sys/netinet/in_pcb.h 1.120 +22 -4 src/sys/netinet/ip_divert.c 1.163 +14 -4 src/sys/netinet/raw_ip.c 1.251 +14 -2 src/sys/netinet/tcp_subr.c 1.139 +1 -2 src/sys/netinet/tcp_usrreq.c 1.191 +14 -4 src/sys/netinet/udp_usrreq.c 1.73 +1 -1 src/sys/netinet6/in6_pcb.c 1.63 +1 -2 src/sys/netinet6/raw_ip6.c 1.66 +1 -2 src/sys/netinet6/udp6_usrreq.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607182234.k6IMYSVp038774>