From: Andrey Mirkin <major@openvz.org>
To: Andi Kleen <ak@suse.de>, Andrew Morton <akpm@osdl.org>, devel@openvz.org
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] return correct error code from child_rip in x86_64 entry.S
Date: Wed, 19 Sep 2007 18:26:25 +0400 [thread overview]
Message-ID: <200709191826.27764.major@openvz.org> (raw)
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)
next reply other threads:[~2007-09-19 14:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-19 14:26 Andrey Mirkin [this message]
2007-09-19 16:17 ` [PATCH] return correct error code from child_rip in x86_64 entry.S Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200709191826.27764.major@openvz.org \
--to=major@openvz.org \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=devel@openvz.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox