Date: Fri, 5 Jan 2007 19:59:46 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern kern_descrip.c uipc_usrreq.c src/sys/sys file.h unpcb.h Message-ID: <200701051959.l05JxkMI014927@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
jhb 2007-01-05 19:59:46 UTC FreeBSD src repository Modified files: sys/kern kern_descrip.c uipc_usrreq.c sys/sys file.h unpcb.h Log: - Close a race between enumerating UNIX domain socket pcb structures via sysctl and socket teardown by adding a reference count to the UNIX domain pcb object and fixing the sysctl that enumerates unpcbs to grab a reference on each unpcb while it builds the list to copy out to userland. - Close a race between UNIX domain pcb garbage collection (unp_gc()) and file descriptor teardown (fdrop()) by adding a new garbage collection flag FWAIT. unp_gc() sets FWAIT while it walks the message buffers in a UNIX domain socket looking for nested file descriptor references and clears the flag when it is finished. fdrop() checks to see if the flag is set on a file descriptor whose refcount just dropped to 0 and waits for unp_gc() to clear the flag before completely destroying the file descriptor. MFC after: 1 week Reviewed by: rwatson Submitted by: ups Hopefully makes the panics go away: mx1 Revision Changes Path 1.300 +11 -0 src/sys/kern/kern_descrip.c 1.189 +51 -16 src/sys/kern/uipc_usrreq.c 1.73 +1 -0 src/sys/sys/file.h 1.21 +1 -0 src/sys/sys/unpcb.h
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701051959.l05JxkMI014927>