]> git.hungrycats.org Git - linux/commit
[IA64] Avoid a rare deadlock during unwind
authorKeith Owens <kaos@sgi.com>
Wed, 20 Oct 2004 06:39:59 +0000 (06:39 +0000)
committerTony Luck <aegl@agluck-lia64.sc.intel.com>
Wed, 20 Oct 2004 06:39:59 +0000 (06:39 +0000)
commitb960a828b73ab460abfc1bb33c0c87a4ece934d2
tree9ea8b41c67ab466b4a213d5ce8ef70565fb86a02
parent12ac2444cc34dbdeac9031dff09bebf6cf8428a4
[IA64] Avoid a rare deadlock during unwind

There is a rare deadlock condition during unwind script creation.  If
build_script() is interrupted in the middle of creating the script, it
holds the script write lock.  If the interrupt handler needs to call
unwind for some failure condition, unwind will try to read the
incomplete script and will deadlock on the script lock.

The fix is to disable interrupts while building the script, so
interrupt handlers never see partial scripts.

Promoting spin_lock_irqsave() from script_new() to find_save_locs()
changes the indentation, so the patch looks bigger than it really is.

Signed-off-by: Keith Owens <kaos@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/kernel/unwind.c