diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2017-09-04 12:07:24 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-09-04 12:07:24 -0400 |
commit | 1985296a3ccd5d89d2ec2ca17b1fa1a225f8ecd1 (patch) | |
tree | 06c90fd9eba9c39bb072699056204ebc6274b073 /include/asm-generic | |
parent | b9ea557ee9b9c4e0446851d955c1283bd76a9ce8 (diff) | |
download | op-kernel-dev-1985296a3ccd5d89d2ec2ca17b1fa1a225f8ecd1.zip op-kernel-dev-1985296a3ccd5d89d2ec2ca17b1fa1a225f8ecd1.tar.gz |
fix the __user misannotations in asm-generic get_user/put_user
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/uaccess.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/asm-generic/uaccess.h b/include/asm-generic/uaccess.h index 723e81a..2e51f6e 100644 --- a/include/asm-generic/uaccess.h +++ b/include/asm-generic/uaccess.h @@ -75,10 +75,10 @@ static inline int __access_ok(unsigned long addr, unsigned long size) #define put_user(x, ptr) \ ({ \ - void *__p = (ptr); \ + void __user *__p = (ptr); \ might_fault(); \ access_ok(VERIFY_WRITE, __p, sizeof(*ptr)) ? \ - __put_user((x), ((__typeof__(*(ptr)) *)__p)) : \ + __put_user((x), ((__typeof__(*(ptr)) __user *)__p)) : \ -EFAULT; \ }) @@ -137,10 +137,10 @@ extern int __put_user_bad(void) __attribute__((noreturn)); #define get_user(x, ptr) \ ({ \ - const void *__p = (ptr); \ + const void __user *__p = (ptr); \ might_fault(); \ access_ok(VERIFY_READ, __p, sizeof(*ptr)) ? \ - __get_user((x), (__typeof__(*(ptr)) *)__p) : \ + __get_user((x), (__typeof__(*(ptr)) __user *)__p) :\ ((x) = (__typeof__(*(ptr)))0,-EFAULT); \ }) |