]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC: Close a race between enumerating UNIX domain socket pcb structures via
authorjhb <jhb@FreeBSD.org>
Fri, 12 Jan 2007 16:24:23 +0000 (16:24 +0000)
committerjhb <jhb@FreeBSD.org>
Fri, 12 Jan 2007 16:24:23 +0000 (16:24 +0000)
commit969c7eb6fc8a8d4f87c89878de4d60a3be1209a6
treecfbba526eee6f89b3d60461b867c009851ec536c
parent82609b5afe99447dbb5bccaca2572497a1bb4c88
MFC: Close a race between enumerating UNIX domain socket pcb structures via
sysctl and socket teardown.  Note that we engage in a bit of trickery to
preserve the ABI of 'struct unpcb' in 6.x.  We change the UMA zone to hold
a 'struct unpcb_wrapper' which holds a 6.x 'struct unpcb' followed by the
new reference count needed for handling the race.  We then cast 'struct
unpcb' pointers to 'struct unpcb_wrapper' pointers when we need to access
the reference count.

Submitted by: ups (including the ABI trickery)
sys/kern/uipc_usrreq.c