lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 19 Sep 2012 11:27:13 +0800 From: hongfeng <hongfeng@...vell.com> To: akpm@...ux-foundation.org, gorcunov@...nvz.org, keescook@...omium.org, serge.hallyn@...onical.com, ebiederm@...ssion.com Cc: linux-kernel@...r.kernel.org, hongfeng <hongfeng@...vell.com> Subject: [PATCH] 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_PROC which will monitor the return value ofuserspace application. Change-Id: I2f9ebbb90c0c2443780080ec9507c8d004e5da74 Signed-off-by: Feng Hong <hongfeng@...vell.com> --- kernel/sys.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kernel/sys.c b/kernel/sys.c index 241507f..1b30b30 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_PROC, NULL, argv_cleanup, NULL); if (ret == -ENOMEM) argv_free(argv); -- 1.7.0.4 -- 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