[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <200709191826.27764.major@openvz.org>
Date: Wed, 19 Sep 2007 18:26:25 +0400
From: Andrey Mirkin <major@...nvz.org>
To: Andi Kleen <ak@...e.de>, Andrew Morton <akpm@...l.org>,
devel@...nvz.org
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: [PATCH] return correct error code from child_rip in x86_64 entry.S
From: Andrey Mirkin <major@...nvz.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@...nvz.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)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists