All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kexec: return error of machine_kexec() fails
@ 2013-07-10  1:54 ` Simon Horman
  0 siblings, 0 replies; 13+ messages in thread
From: Simon Horman @ 2013-07-10  1:54 UTC (permalink / raw)
  To: Andrew Morton
  Cc: kexec, Stephen Warren, Eric Biederman, linux-kernel,
	Stephen Warren

From: Stephen Warren <swarren@nvidia.com>

Prior to commit 3ab8352 "kexec jump", if machine_kexec() returned,
sys_reboot() would return -EINVAL. This patch restores this behaviour
for the non-KEXEC_JUMP case, where machine_kexec() is not expected to
return.

This situation can occur on ARM, where kexec requires disabling all but
one CPU using CPU hotplug. However, if hotplug isn't supported by the
particular HW the kernel is running on, then kexec cannot succeed.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Acked-by: Simon Horman <horms@verge.net.au>
---
 kernel/kexec.c | 2 ++
 1 file changed, 2 insertions(+)

Andrew, could you consider picking up this patch?

diff --git a/kernel/kexec.c b/kernel/kexec.c
index 59f7b55..bde1190 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -1702,6 +1702,8 @@ int kernel_kexec(void)
 		pm_restore_console();
 		unlock_system_sleep();
 	}
+#else
+	error = -EINVAL;
 #endif
 
  Unlock:
-- 
1.8.2.1


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-07-10 23:57 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-10  1:54 [PATCH] kexec: return error of machine_kexec() fails Simon Horman
2013-07-10  1:54 ` Simon Horman
2013-07-10 14:36 ` Eric W. Biederman
2013-07-10 14:36   ` Eric W. Biederman
2013-07-10 19:09   ` Stephen Warren
2013-07-10 19:09     ` Stephen Warren
2013-07-10 19:09     ` Stephen Warren
2013-07-10 20:42     ` Eric W. Biederman
2013-07-10 20:42       ` Eric W. Biederman
2013-07-10 20:42       ` Eric W. Biederman
2013-07-10 23:51       ` Russell King - ARM Linux
2013-07-10 23:51         ` Russell King - ARM Linux
2013-07-10 23:51         ` Russell King - ARM Linux

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.