Temporarily check for and correct a race in getnewbuf() that exists due
authorMatthew Dillon <dillon@dragonflybsd.org>
Mon, 14 Nov 2005 19:14:05 +0000 (19:14 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Mon, 14 Nov 2005 19:14:05 +0000 (19:14 +0000)
commitd9dba6f60b02a195c9807a00f81b1f2a8e58d909
treeba7d76d744f159ca6ad5020db1d2875b4fe7cc1c
parent344ad853388ea34261cc85d903fa9e4cb0ef2198
Temporarily check for and correct a race in getnewbuf() that exists due
to the fact that lockmgr locks use tokens for their interlock.  The use
of a token can cause the atomicy of the big giant lock to be temporarily
lost and wind up breaking the assumed atomicy of higher level operations that
believed themselves to be safe making lockmgr calls with the LK_NOWAIT flag.

The general problem will soon be fixed by changing the lockmgr interlock
from a token to one of Jeffrey Hsu's spin locks.  Fortunately there are
only a few places left in DragonFly where LK_INTERLOCK is used.
sys/kern/vfs_bio.c