提交 1c5b5cfd 编写于 作者: A Andrey Mirkin 提交者: Thomas Gleixner

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: NAndrey Mirkin <major@openvz.org>
Signed-off-by: NAndi Kleen <ak@suse.de>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 aa506dc7
...@@ -988,7 +988,7 @@ child_rip: ...@@ -988,7 +988,7 @@ child_rip:
movq %rsi, %rdi movq %rsi, %rdi
call *%rax call *%rax
# exit # exit
xorl %edi, %edi mov %eax, %edi
call do_exit call do_exit
CFI_ENDPROC CFI_ENDPROC
ENDPROC(child_rip) ENDPROC(child_rip)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册