Re: [PATCH] kexec jump: fix compiling warning on xchg(&kexec_lock, 0) in kernel_kexec()

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>
Cc: <ebiederm@...>, <ying.huang@...>, <pavel@...>, <nigel@...>, <rjw@...>, <vgoyal@...>, <mingo@...>, <linux-kernel@...>, <kexec@...>
Date: Wednesday, August 13, 2008 - 4:31 pm

On Wed, 13 Aug 2008, Andrew Morton wrote:

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
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] kexec jump: fix compiling warning on xchg(&amp;k..., Eric W. Biederman, (Wed Aug 13, 2:12 pm)
Re: [PATCH] kexec jump: fix compiling warning on xchg(&k..., Linus Torvalds, (Wed Aug 13, 4:31 pm)