[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090410083813.GQ14687@one.firstfloor.org>
Date: Fri, 10 Apr 2009 10:38:13 +0200
From: Andi Kleen <andi@...stfloor.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Andi Kleen <andi@...stfloor.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Clean up sys_shutdown
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@...ux.intel.com -- Speaking for myself only.
--
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