mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
fix the __user misannotations in asm-generic get_user/put_user
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
b9ea557ee9
commit
1985296a3c
1 changed files with 4 additions and 4 deletions
|
@ -75,10 +75,10 @@ static inline int __access_ok(unsigned long addr, unsigned long size)
|
||||||
|
|
||||||
#define put_user(x, ptr) \
|
#define put_user(x, ptr) \
|
||||||
({ \
|
({ \
|
||||||
void *__p = (ptr); \
|
void __user *__p = (ptr); \
|
||||||
might_fault(); \
|
might_fault(); \
|
||||||
access_ok(VERIFY_WRITE, __p, sizeof(*ptr)) ? \
|
access_ok(VERIFY_WRITE, __p, sizeof(*ptr)) ? \
|
||||||
__put_user((x), ((__typeof__(*(ptr)) *)__p)) : \
|
__put_user((x), ((__typeof__(*(ptr)) __user *)__p)) : \
|
||||||
-EFAULT; \
|
-EFAULT; \
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -137,10 +137,10 @@ extern int __put_user_bad(void) __attribute__((noreturn));
|
||||||
|
|
||||||
#define get_user(x, ptr) \
|
#define get_user(x, ptr) \
|
||||||
({ \
|
({ \
|
||||||
const void *__p = (ptr); \
|
const void __user *__p = (ptr); \
|
||||||
might_fault(); \
|
might_fault(); \
|
||||||
access_ok(VERIFY_READ, __p, sizeof(*ptr)) ? \
|
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); \
|
((x) = (__typeof__(*(ptr)))0,-EFAULT); \
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue