Commit 26b880d6 authored by Andrey Mirkin's avatar Andrey Mirkin Committed by Greg Kroah-Hartman

x86: return correct error code from child_rip in x86_64 entry.S

patch 1c5b5cfd 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: default avatarAndrey Mirkin <major@openvz.org>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 5b7e28db
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment