Fix a MP lock race. The MP locking state can change when lwkt_chktokens()
authorMatthew Dillon <dillon@dragonflybsd.org>
Tue, 19 Jul 2005 19:08:05 +0000 (19:08 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Tue, 19 Jul 2005 19:08:05 +0000 (19:08 +0000)
commita453459d11fb6b45e804a090c90e08e3d28e907a
tree6ba4b4cb234f74f74b91b00dc583bcf9738f7363
parent077b4ede40cfaa7a9134fa9665c3a07aa99ff8f5
Fix a MP lock race.  The MP locking state can change when lwkt_chktokens()
returns a failure.  The state is not retained by an interrupt because we
are trying to set it for the new thread rather then the current thread, and
the current thread's mpcount could be 0.

Change ASSERT_MP_LOCK_HELD() to supply a thread for reporting purposes in
the KASSERT.

Reported-by: David Rhodus <sdrhodus@gmail.com>
sys/i386/i386/vm86.c
sys/i386/include/lock.h
sys/kern/lwkt_thread.c
sys/platform/pc32/i386/vm86.c
sys/platform/pc32/include/lock.h