]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Ensure that spinlock sections are balanced even after a panic.
authorMark Johnston <markj@FreeBSD.org>
Tue, 5 Jul 2016 17:59:04 +0000 (17:59 +0000)
committerMark Johnston <markj@FreeBSD.org>
Tue, 5 Jul 2016 17:59:04 +0000 (17:59 +0000)
commitf61d6c5a5bdbc6d02b095dad836c016094b32cf1
treef9f20f59906916cf60f3ce99ac8f415cfff99abf
parent971711fb7ca662e7f5a7ff6130ae8b90af168ff4
Ensure that spinlock sections are balanced even after a panic.

vpanic() uses spinlock_enter() to disable interrupts before dumping core.
However, when the scheduler is stopped and INVARIANTS is not configured,
thread_lock() does not acquire a spinlock section, while thread_unlock()
releases one. This can result in interrupts staying enabled while the
kernel dumps core, complicating post-mortem analysis of the crash.

Approved by: re (gjb)
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
sys/kern/kern_mutex.c