Skip to contentSkip to conversation

UML - __user annotation in arch_prctl

PATCH New Jeff Dike 1 participant 1 message Jun 4, 2006 User-mode Linux (UML)

lore
Share & tools
lore

Jeff Dike

author
#0 lore raw

PATCH 4/6 UML - __user annotation in arch_prctl

From: Al Viro <[email protected]>

fix uml/amd64 prctl()

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

arch/um/sys-x86_64/syscalls.c +1 -1
Index: linux-2.6.17-mm/arch/um/sys-x86_64/syscalls.c
===================================================================
@@ -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;