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: Huang Ying <ying.huang@...>, Eric W. Biederman <ebiederm@...>, Pavel Machek <pavel@...>, <nigel@...>, Rafael J. Wysocki <rjw@...>, Vivek Goyal <vgoyal@...>, <mingo@...>, <linux-kernel@...>, Kexec Mailing List <kexec@...>
Date: Wednesday, August 13, 2008 - 1:01 pm

On Wed, 13 Aug 2008, Andrew Morton wrote:

No, please don't. 

Just don't take this whole patch-series until it's cleaned up. There is 
absolutely no excuse for using xchg as a locking primitive. Nothing like 
this should be queued anywhere, it should be burned and the ashes should 
be scattered over the atlantic so that nobody will ever see them again.

F*ck me with a spoon, if you have to use xchg() to do a trylock, why the 
hell isn't the unlock sequence then

	smp_mb();
	var = 0;

instead? Not that that's really right either, but at least it avoids the 
_ridiculous_ crap. The real solution is probably to use a spinlock and 
trylock/unlock.

		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, 1:01 pm)