From: Andi Kleen <andi@firstfloor.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Andi Kleen <andi@firstfloor.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Clean up sys_shutdown
Date: Fri, 10 Apr 2009 10:38:13 +0200 [thread overview]
Message-ID: <20090410083813.GQ14687@one.firstfloor.org> (raw)
In-Reply-To: <20090409221416.9a74f7fa.akpm@linux-foundation.org>
On Thu, Apr 09, 2009 at 10:14:16PM -0700, Andrew Morton wrote:
> I wonder why this code uses lock_kernel().
I suspect because there's no other lock and parallel shutdowns
would be bad, but I wouldn't be surprised if there
aren't some caller without.
We could just convert it to a new global mutex or something.
I think it would be safe on x86, but I'm not sure about
all the other architectures.
Actually a simple flag would be enough that returns when
one is already in progress (that wouldn't work if parallel ones
fail, but that's presumably unlikely)
-Andi
--
ak@linux.intel.com -- Speaking for myself only.
prev parent reply other threads:[~2009-04-10 8:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-07 22:36 [PATCH] Clean up sys_shutdown Andi Kleen
2009-04-10 5:14 ` Andrew Morton
2009-04-10 8:38 ` Andi Kleen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090410083813.GQ14687@one.firstfloor.org \
--to=andi@firstfloor.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox