[PATCH 4/6] UML - __user annotation in arch_prctl

From: Jeff Dike
Date: Sat Jun 03 2006 - 22:15:58 EST


From: Al Viro <viro@xxxxxxxxxxxxxxxxxx>

fix uml/amd64 prctl()

put_user() there should go to (long __user *)addr, not &addr

Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Jeff Dike <jdike@xxxxxxxxxxx>

Index: linux-2.6.17-mm/arch/um/sys-x86_64/syscalls.c
===================================================================
--- linux-2.6.17-mm.orig/arch/um/sys-x86_64/syscalls.c 2006-05-31 12:14:58.000000000 -0400
+++ linux-2.6.17-mm/arch/um/sys-x86_64/syscalls.c 2006-06-02 18:39:09.000000000 -0400
@@ -45,7 +45,7 @@ static long arch_prctl_tt(int code, unsi
case ARCH_GET_GS:
ret = arch_prctl(code, (unsigned long) &tmp);
if(!ret)
- ret = put_user(tmp, &addr);
+ ret = put_user(tmp, (long __user *)addr);
break;
default:
ret = -EINVAL;


-
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/