return correct error code from child_rip in x86_64 entry.S
PATCH 1/1 return correct error code from child_rip in x86_64 entry.S
From: Andrey Mirkin <[email protected]>
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.
Signed-off-by Andrey Mirkin <[email protected]>
-----
arch/x86_64/kernel/entry.S +1 -1
@@ -989,7 +989,7 @@ child_rip: movq %rsi, %rdi call *%rax # exit - xorl %edi, %edi + movq %rax, %rdi call do_exit CFI_ENDPROC ENDPROC(child_rip)
Quoted 5 lines · On Wednesday 19 September 2007 16:26:25 Andrey Mirkin wrote:
From: Andrey Mirkin <[email protected]>
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.
Applied thanks
-Andi