cvs commit: src/sys/kern subr_turnstile.c

Robert Watson rwatson at FreeBSD.org
Tue Sep 9 10:09:36 UTC 2008


On Mon, 8 Sep 2008, John Baldwin wrote:

>  SVN rev 182879 on 2008-09-08 21:40:15Z by jhb
>
>  - Reduce scope of #ifdef's in uma_zcreate() call in init_turnstile0().
>  - Set UMA_ZONE_NOFREE so that the per-turnstile spin locks are type stable
>    to avoid a race where one thread might dereference a lock in a free'd
>    turnstile that was previously used by another thread.

Is this a feature or a workaround for a bug?  Normally in the above scenario 
we would consider use-after-free a bug or symptom of a larger architectural 
problem rather than a feature.  At least, that's what I consider similar use 
of UMA_ZONE_NOFREE where it persists in the network stack :-).

Robert N M Watson
Computer Laboratory
University of Cambridge


More information about the cvs-src mailing list