[PATCH] Specify the arch on kexec_unload.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 at suse.de>
---
 kexec/kexec.c |    8 ++++++++
 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) {
-- 
1.5.4.5




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux