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.24-rc1~476^2~101 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1c5b5cfd290b6cb7c67020ef420e275f746a7236;p=karo-tx-linux.git 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 --- diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index f1cacd4897f7..3a058bb16409 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S @@ -988,7 +988,7 @@ child_rip: movq %rsi, %rdi call *%rax # exit - xorl %edi, %edi + mov %eax, %edi call do_exit CFI_ENDPROC ENDPROC(child_rip)