cvs commit: src/sys/kern kern_lock.c
Simon Schubert
corecode at crater.dragonflybsd.org
Wed Jan 9 03:00:12 PST 2008
corecode 2008/01/09 02:59:12 PST
DragonFly src repository
Modified files:
sys/kern kern_lock.c
Log:
Fix lockuninit.
lockuninit was acquiring the spinlock embedded in struct lock, thus
incrementing the per-thread spinlock count. However, spin_uninit does
not decrement the count, resulting in a panic when trying to sleep
("lwkt_switch: still holding %d exclusive spinlocks!"). From now on,
require that the caller already holds the struct lock in question so
that lockuninit can rely on it being the sole owner of the lock.
Lots of help from: corecode@, aggelos
Comment from Aggelos: "That's what you get when commiting code without
any in-tree users."
Submitted-by: nant@
Revision Changes Path
1.27 +8 -2 src/sys/kern/kern_lock.c
http://www.dragonflybsd.org/cvsweb/src/sys/kern/kern_lock.c.diff?r1=1.26&r2=1.27&f=u
More information about the Commits
mailing list