Skip to content

Commit

Permalink
x86: return correct error code from child_rip in x86_64 entry.S
Browse files Browse the repository at this point in the history
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 <major@openvz.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Andrey Mirkin authored and Thomas Gleixner committed Oct 17, 2007
1 parent aa506dc commit 1c5b5cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kernel/entry_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1c5b5cf

Please sign in to comment.