[Patch] uml: fix one compile error

From: AmÃrico Wang
Date: Thu Oct 16 2008 - 11:26:59 EST

This patch fixed the following compile error:

CC arch/um/sys-i386/signal.o
/home/wangcong/Projects/linux-2.6/arch/um/sys-i386/signal.c: In
function 'copy_sc_from_user':
warning: dereferencing 'void *' pointer
error: request for member '_fxsr_env' in something not a structure or

Signed-off-by: WANG Cong <wangcong@xxxxxxxxx>
Cc: jdike@xxxxxxxxxxx

diff --git a/arch/um/sys-i386/signal.c b/arch/um/sys-i386/signal.c
index fd0c25a..1296473 100644
--- a/arch/um/sys-i386/signal.c
+++ b/arch/um/sys-i386/signal.c
@@ -179,7 +179,8 @@ static int copy_sc_from_user(struct pt_regs *regs,
if (have_fpx_regs) {
struct user_fxsr_struct fpx;

- err = copy_from_user(&fpx, &sc.fpstate->_fxsr_env[0],
+ err = copy_from_user(&fpx,
+ &((struct _fpstate __user *)sc.fpstate)->_fxsr_env[0],
sizeof(struct user_fxsr_struct));
if (err)
return 1;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/