Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
1985296a
Commit
1985296a
authored
Sep 04, 2017
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix the __user misannotations in asm-generic get_user/put_user
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
b9ea557e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
include/asm-generic/uaccess.h
include/asm-generic/uaccess.h
+4
-4
No files found.
include/asm-generic/uaccess.h
View file @
1985296a
...
@@ -75,10 +75,10 @@ static inline int __access_ok(unsigned long addr, unsigned long size)
...
@@ -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));
...
@@ -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); \
})
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment