From: hongfeng <hongfeng@marvell.com>
To: akpm@linux-foundation.org, gorcunov@openvz.org,
keescook@chromium.org, serge.hallyn@canonical.com,
ebiederm@xmission.com
Cc: linux-kernel@vger.kernel.org, hongfeng <hongfeng@marvell.com>
Subject: [PATCH V2] poweroff: fix bug in orderly_poweroff
Date: Wed, 19 Sep 2012 14:37:57 +0800 [thread overview]
Message-ID: <1348036677-28626-1-git-send-email-hongfeng@marvell.com> (raw)
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.
Change-Id: I2f9ebbb90c0c2443780080ec9507c8d004e5da74
Signed-off-by: Feng Hong <hongfeng@marvell.com>
Acked-by: Kees Cook <keescook@chromium.org>
---
kernel/sys.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/sys.c b/kernel/sys.c
index 241507f..a624d4c 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -2204,7 +2204,7 @@ static int __orderly_poweroff(void)
return -ENOMEM;
}
- ret = call_usermodehelper_fns(argv[0], argv, envp, UMH_NO_WAIT,
+ ret = call_usermodehelper_fns(argv[0], argv, envp, UMH_WAIT_EXEC,
NULL, argv_cleanup, NULL);
if (ret == -ENOMEM)
argv_free(argv);
--
1.7.0.4
next reply other threads:[~2012-09-19 6:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-19 6:37 hongfeng [this message]
2012-09-20 17:06 ` Serge E. Hallyn
2012-09-21 0:16 ` Feng Hong
2012-09-21 0:25 ` Andrew Morton
2012-09-21 1:45 ` Feng Hong
2012-09-21 15:30 ` Serge Hallyn
-- strict thread matches above, loose matches on Subject: below --
2012-09-19 6:32 hongfeng
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=1348036677-28626-1-git-send-email-hongfeng@marvell.com \
--to=hongfeng@marvell.com \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=gorcunov@openvz.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=serge.hallyn@canonical.com \
/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
all inboxes | Powered by JetHome®