summaryrefslogtreecommitdiff
path: root/kexec/kexec.c
diff options
context:
space:
mode:
authorBernhard Walle <bwalle@suse.de>2008-05-26 16:46:58 +0200
committerSimon Horman <horms@verge.net.au>2008-05-28 10:06:35 +1000
commit0232cd4d5bdd755393b061de8b9af846fb8a35be (patch)
tree14070b0ea8d8ac73b1e63ae3196e6ab8fcaaba74 /kexec/kexec.c
parentbf61432d40c2b2618f17735254090b7653319bb7 (diff)
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 <bwalle@suse.de> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/kexec.c')
-rw-r--r--kexec/kexec.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kexec/kexec.c b/kexec/kexec.c
index 096fa4f..1550d68 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
@@ -702,6 +702,14 @@ static int my_load(const char *type, int fileind, int argc, char **argv,
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) {