aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-09-04 12:07:24 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2017-09-04 12:07:24 -0400
commit1985296a3ccd5d89d2ec2ca17b1fa1a225f8ecd1 (patch)
tree06c90fd9eba9c39bb072699056204ebc6274b073
parentb9ea557ee9b9c4e0446851d955c1283bd76a9ce8 (diff)
fix the __user misannotations in asm-generic get_user/put_user
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--include/asm-generic/uaccess.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/asm-generic/uaccess.h b/include/asm-generic/uaccess.h
index 723e81a6c162..2e51f6e7b3c2 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)
75 75
76#define put_user(x, ptr) \ 76#define put_user(x, ptr) \
77({ \ 77({ \
78 void *__p = (ptr); \ 78 void __user *__p = (ptr); \
79 might_fault(); \ 79 might_fault(); \
80 access_ok(VERIFY_WRITE, __p, sizeof(*ptr)) ? \ 80 access_ok(VERIFY_WRITE, __p, sizeof(*ptr)) ? \
81 __put_user((x), ((__typeof__(*(ptr)) *)__p)) : \ 81 __put_user((x), ((__typeof__(*(ptr)) __user *)__p)) : \
82 -EFAULT; \ 82 -EFAULT; \
83}) 83})
84 84
@@ -137,10 +137,10 @@ extern int __put_user_bad(void) __attribute__((noreturn));
137 137
138#define get_user(x, ptr) \ 138#define get_user(x, ptr) \
139({ \ 139({ \
140 const void *__p = (ptr); \ 140 const void __user *__p = (ptr); \
141 might_fault(); \ 141 might_fault(); \
142 access_ok(VERIFY_READ, __p, sizeof(*ptr)) ? \ 142 access_ok(VERIFY_READ, __p, sizeof(*ptr)) ? \
143 __get_user((x), (__typeof__(*(ptr)) *)__p) : \ 143 __get_user((x), (__typeof__(*(ptr)) __user *)__p) :\
144 ((x) = (__typeof__(*(ptr)))0,-EFAULT); \ 144 ((x) = (__typeof__(*(ptr)))0,-EFAULT); \
145}) 145})
146 146