HomeFreeBSD

Fix race conditions on enumerating pcb lists by moving the initialization

Description

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

Details

Provenance
Stephan Uphoff <ups@FreeBSD.org>Authored on Jul 18 2006, 10:34 PM
Parents
rG0c6d6356bab4: Remove unnecessary locking for td_dupfd (it requires no locks).
Branches
Unknown
Tags
Unknown

Event Timeline