public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] return correct error code from child_rip in x86_64 entry.S
@ 2007-09-19 14:26 Andrey Mirkin
  2007-09-19 16:17 ` Andi Kleen
  0 siblings, 1 reply; 2+ messages in thread
From: Andrey Mirkin @ 2007-09-19 14:26 UTC (permalink / raw)
  To: Andi Kleen, Andrew Morton, devel; +Cc: Linux Kernel Mailing List

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)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] return correct error code from child_rip in x86_64 entry.S
  2007-09-19 14:26 [PATCH] return correct error code from child_rip in x86_64 entry.S Andrey Mirkin
@ 2007-09-19 16:17 ` Andi Kleen
  0 siblings, 0 replies; 2+ messages in thread
From: Andi Kleen @ 2007-09-19 16:17 UTC (permalink / raw)
  To: Andrey Mirkin; +Cc: Andrew Morton, devel, Linux Kernel Mailing List

On Wednesday 19 September 2007 16:26:25 Andrey Mirkin wrote:
> 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.

Applied thanks

-Andi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-09-19 16:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-19 14:26 [PATCH] return correct error code from child_rip in x86_64 entry.S Andrey Mirkin
2007-09-19 16:17 ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox