]> git.baikalelectronics.ru Git - kernel.git/commit
handle recursive calls to bust_spinlocks()
authorJan Beulich <jbeulich@novell.com>
Wed, 17 Oct 2007 06:29:33 +0000 (23:29 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 17 Oct 2007 15:42:56 +0000 (08:42 -0700)
commit6dfd3008ec35155b4ad57667e2170f49dcfe68f2
treeb137a191e02dd086a7c9aaa41fb88b7bdd362ce4
parent2837dad58219e4e01e7665b840a43f50b9007f8b
handle recursive calls to bust_spinlocks()

Various architectures may call bust_spinlocks() recursively; the function
itself, however, doesn't appear to be meant to be called in this manner.
Nevertheless, this doesn't appear to be a problem as long as
bust_spinlocks(0) doesn't get called twice in a row (otherwise,
unblank_screen() may enter the scheduler).  However, at least on i386 die()
has been capable of returning (and on other architectures this should
really be that way, too) when notify_die() returns NOTIFY_STOP.

Short of getting a reply to a respective query, this patch makes
bust_spinlocks() increment/decrement oops_in_progress, and wake klogd only
when the count drops back to zero.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/bust_spinlocks.c