summaryrefslogtreecommitdiff
path: root/include/asm-generic
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-09-15 06:01:41 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2017-09-15 06:01:41 +0300
commit9e0ce554b039e3df288d83189ecf226c16da04af (patch)
tree4be797c49516bb99e1a7a994302643c6c02603c2 /include/asm-generic
parente253d98f5babbec7e6ced810f7335b265a7f7e83 (diff)
parent1985296a3ccd5d89d2ec2ca17b1fa1a225f8ecd1 (diff)
downloadlinux-9e0ce554b039e3df288d83189ecf226c16da04af.tar.xz
Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull misc leftovers from Al Viro. * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix the __user misannotations in asm-generic get_user/put_user fput: Don't reinvent the wheel but use existing llist API namespace.c: Don't reinvent the wheel but use existing llist API
Diffstat (limited to 'include/asm-generic')
-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)
#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); \
})