[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <49773C2E.9090608@gmail.com>
Date: Wed, 21 Jan 2009 16:15:58 +0100
From: Roel Kluin <roel.kluin@...il.com>
To: Jeff Dike <jdike@...toit.com>, lkml <linux-kernel@...r.kernel.org>
CC: uml-devel <user-mode-linux-devel@...ts.sourceforge.net>
Subject: [PATCH] x86, um: fix GETREG/PUTREG macros
When these macros aren't called with regs, e.g. with foo
this will incorectly expand to foo->foo.gp[*]
Signed-off-by: Roel Kluin <roel.kluin@...il.com>
---
My other patch should probably as well have been sent to this list:
http://lkml.org/lkml/2009/1/21/203
diff --git a/arch/um/sys-x86_64/signal.c b/arch/um/sys-x86_64/signal.c
index 1a899a7..31d0e9c 100644
--- a/arch/um/sys-x86_64/signal.c
+++ b/arch/um/sys-x86_64/signal.c
@@ -49,8 +49,8 @@ static int copy_sc_from_user(struct pt_regs *regs,
struct user_i387_struct fp;
int err = 0;
-#define GETREG(regs, regno, sc, regname) \
- __get_user((regs)->regs.gp[(regno) / sizeof(unsigned long)], \
+#define GETREG(_regs, regno, sc, regname) \
+ __get_user((_regs)->regs.gp[(regno) / sizeof(unsigned long)], \
&(sc)->regname)
err |= GETREG(regs, R8, from, r8);
@@ -104,8 +104,8 @@ static int copy_sc_to_user(struct sigcontext __user *to,
err |= __put_user(0, &to->gs);
err |= __put_user(0, &to->fs);
-#define PUTREG(regs, regno, sc, regname) \
- __put_user((regs)->regs.gp[(regno) / sizeof(unsigned long)], \
+#define PUTREG(_regs, regno, sc, regname) \
+ __put_user((_regs)->regs.gp[(regno) / sizeof(unsigned long)], \
&(sc)->regname)
err |= PUTREG(regs, RDI, to, di);
--
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