]> git.karo-electronics.de Git - karo-tx-linux.git/commit
poweroff: fix bug in orderly_poweroff()
authorhongfeng <hongfeng@marvell.com>
Fri, 21 Sep 2012 01:01:56 +0000 (11:01 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 25 Sep 2012 08:46:31 +0000 (18:46 +1000)
commit640ad502553d13f9a30f467e14cc90c2730eb709
tree48b7b92be4682421f52c1cca1c090ed99c1bcbb1
parente12d9dc2b35acb7981b2042b47289199cf0b0e4c
poweroff: fix bug in orderly_poweroff()

orderly_poweroff is trying to poweroff platform by two steps:

step 1: Call userspace application to poweroff

step 2: If userspace poweroff fail, then do a force power off if force
param is set.

The bug here is, step 1 is always successful with param UMH_NO_WAIT,
should change to UMH_WAIT_EXEC which will monitor whether user application
successful run.

Signed-off-by: Feng Hong <hongfeng@marvell.com>
Acked-by: Kees Cook <keescook@chromium.org>
Cc: Serge Hallyn <serge.hallyn@canonical.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/sys.c