[PATCH] kexec jump: fix compiling warning on xchg(&kexec_lock, 0) in kernel_kexec()
Linus Torvalds
torvalds at linux-foundation.org
Wed Aug 13 16:31:24 EDT 2008
On Wed, 13 Aug 2008, Andrew Morton wrote:
>
> #2:
I thought you said there were things that want to sleep in the region?
If so, spinlocks will work as long as you don't have CONFIG_PREEMPT or
lock validation (there's no way to deadlock thanks to all the lock getters
using the "trylock" variant), but will blow up because a successful
trylock will obviously also disable preemption and/or trigger all the lock
detection.
So if there are potential sleepers, you'd need the mutex instead.
Linus
More information about the kexec
mailing list