diff options
| author | Alexander Viro <viro@parcelfarce.linux.theplanet.co.uk> | 2004-12-29 01:32:38 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-12-29 01:32:38 -0800 |
| commit | 467bea26647abe4e16bc5f724b4421ba036fbc56 (patch) | |
| tree | 8eb1729967a659a51818d3c4e5fa2ada1e052aa8 /include | |
| parent | b24657db38b9e4a3e53bd4f11a856b66dcb18c9d (diff) | |
[PATCH] i386 uaccess annotations
get_user() stores result in a local variable that later gets cast to
integer or pointer type. The proper type for that is unsigned long.
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-i386/uaccess.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/asm-i386/uaccess.h b/include/asm-i386/uaccess.h index 3553bec125f4..3dd31eb5b3a0 100644 --- a/include/asm-i386/uaccess.h +++ b/include/asm-i386/uaccess.h @@ -170,7 +170,8 @@ extern void __get_user_4(void); * On error, the variable @x is set to zero. */ #define get_user(x,ptr) \ -({ int __ret_gu,__val_gu; \ +({ int __ret_gu; \ + unsigned long __val_gu; \ __chk_user_ptr(ptr); \ switch(sizeof (*(ptr))) { \ case 1: __get_user_x(1,__ret_gu,__val_gu,ptr); break; \ @@ -338,7 +339,8 @@ struct __large_struct { unsigned long buf[100]; }; #define __get_user_nocheck(x,ptr,size) \ ({ \ - long __gu_err, __gu_val; \ + long __gu_err; \ + unsigned long __gu_val; \ __get_user_size(__gu_val,(ptr),(size),__gu_err,-EFAULT);\ (x) = (__typeof__(*(ptr)))__gu_val; \ __gu_err; \ |
