From: Al Viro Date: Sun, 4 Jun 2006 09:51:47 +0000 (-0700) Subject: [PATCH] uml: __user annotation in arch_prctl X-Git-Tag: MMI-PSA29.97-13-9~49560 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ca34fb1a8786af43457ec4f1bfc101a66d1160e0;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [PATCH] uml: __user annotation in arch_prctl From: Al Viro fix uml/amd64 prctl() put_user() there should go to (long __user *)addr, not &addr Signed-off-by: Al Viro Signed-off-by: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/um/sys-x86_64/syscalls.c b/arch/um/sys-x86_64/syscalls.c index 6acee5c4ada6..6fce9f45dfdc 100644 --- a/arch/um/sys-x86_64/syscalls.c +++ b/arch/um/sys-x86_64/syscalls.c @@ -45,7 +45,7 @@ static long arch_prctl_tt(int code, unsigned long addr) 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;