OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] return correct error code from child_rip in x86_64 entry.S
[PATCH] return correct error code from child_rip in x86_64 entry.S [message #20545] Wed, 19 September 2007 14:26
Andrey Mirkin is currently offline  Andrey Mirkin
Messages: 193
Registered: May 2006
Senior Member
From: Andrey Mirkin <major@openvz.org>

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 <major@openvz.org>

-----

diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S
index 1d232e5..ac6400e 100644
--- a/arch/x86_64/kernel/entry.S
+++ b/arch/x86_64/kernel/entry.S
@@ -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)
 
Read Message
Previous Topic: [patch 0/1] fix veth netif_carrier_off
Next Topic: Re: [PATCH] return correct error code from child_rip in x86_64 entry.S
Goto Forum:
  


Current Time: Thu Aug 15 05:46:25 GMT 2024

Total time taken to generate the page: 0.02724 seconds