From eeec23d689747e9170c6f711161cf1f1258ee03e Mon Sep 17 00:00:00 2001 From: Bernhard Walle Date: Mon, 26 May 2008 14:12:53 +0200 Subject: [PATCH] Specify the arch on kexec_unload. This fixes the problem in kexec-tools that the patch http://article.gmane.org/gmane.linux.kernel/685027 tries to fix in kernel. The fix in userspace is correct. Signed-off-by: Bernhard Walle --- kexec/kexec.c | 8 ++++++++ 1 file changed, 8 insertions(+) --- a/kexec/kexec.c +++ b/kexec/kexec.c @@ -714,6 +714,14 @@ static int my_load(const char *type, int int k_unload (unsigned long kexec_flags) { int result; + long native_arch; + + /* set the arch */ + native_arch = physical_arch(); + if (native_arch < 0) { + return -1; + } + kexec_flags |= native_arch; result = kexec_load(NULL, 0, NULL, kexec_flags); if (result != 0) {