[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.1.10.0808130958220.3462@nehalem.linux-foundation.org>
Date: Wed, 13 Aug 2008 10:01:13 -0700 (PDT)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Andrew Morton <akpm@...ux-foundation.org>
cc: Huang Ying <ying.huang@...el.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Pavel Machek <pavel@....cz>, nigel@...el.suspend2.net,
"Rafael J. Wysocki" <rjw@...k.pl>, Vivek Goyal <vgoyal@...hat.com>,
mingo@...e.hu, linux-kernel@...r.kernel.org,
Kexec Mailing List <kexec@...ts.infradead.org>
Subject: Re: [PATCH] kexec jump: fix compiling warning on xchg(&kexec_lock,
0) in kernel_kexec()
On Wed, 13 Aug 2008, Andrew Morton wrote:
>
> We don't need to create that local. I queued this:
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists