[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20130227053738.GN30946@truffula.fritz.box>
Date:	Wed, 27 Feb 2013 16:37:38 +1100
From:	David Gibson <david@...son.dropbear.id.au>
To:	linux-kernel@...r.kernel.org
Cc:	Paul Mackerras <paulus@...ba.org>, hongfeng <hongfeng@...vell.com>
Subject: orderly_poweroff() is no longer safe in atomic context
Commit 6c0c0d4d1080840eabb3d055d2fd81911111c5fd "poweroff: fix bug in
orderly_poweroff()" apparently fixes one bug in orderly_poweroff(),
but introduces another.  The comments on orderly_poweroff() claim it
can be called from any context - and indeed we call it from interrupt
context in arch/powerpc/platforms/pseries/ras.c for example.  But
since that commit this is no longer safe, since
call_usermodehelper_fns() is not safe in interrupt context without the
UMH_NO_WAIT option.
I'm having trouble understanding the commit message to see what the
original bug being fixed was.  Specifically I can't make sense of:
  |  The bug here is, step 1 is always successful with param
  |  UMH_NO_WAIT, which obey the design goal of orderly_poweroff.
And without understanding the original bug, I'm not sure what the
correct fix is.
-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
Download attachment "signature.asc" of type "application/pgp-signature" (199 bytes)
Powered by blists - more mailing lists
 
