From: Andrey Mirkin Date: Wed, 17 Oct 2007 16:04:33 +0000 (+0200) Subject: x86: return correct error code from child_rip in x86_64 entry.S X-Git-Tag: v2.6.23.9~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26b880d662d639f0ed0dc5a7b71c1e3557abe003;p=thirdparty%2Fkernel%2Fstable.git x86: return correct error code from child_rip in x86_64 entry.S patch 1c5b5cfd290b6cb7c67020ef420e275f746a7236 in mainline. x86: return correct error code from child_rip in x86_64 entry.S Right now register edi is just cleared before calling do_exit. That is wrong because correct return value will be ignored. Value from rax should be copied to rdi instead of clearing edi. AK: changed to 32bit move because it's strictly an int [ tglx: arch/x86 adaptation ] Signed-off-by: Andrey Mirkin Signed-off-by: Andi Kleen Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S index 1d232e5f5658e..a6aad3996f850 100644 --- a/arch/x86_64/kernel/entry.S +++ b/arch/x86_64/kernel/entry.S @@ -989,7 +989,7 @@ child_rip: movq %rsi, %rdi call *%rax # exit - xorl %edi, %edi + mov %eax, %edi call do_exit CFI_ENDPROC ENDPROC(child_rip)