HomeFreeBSD

- Close a race between enumerating UNIX domain socket pcb structures via

Description

  • 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

Details

Provenance
jhbAuthored on Jan 5 2007, 7:59 PM
Parents
rG663b416f164c: - Add a new function uma_zone_exhausted() to see if a zone is full.
Branches
Unknown
Tags
Unknown

Event Timeline