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
nexedi
linux
Commits
ab0aca27
Commit
ab0aca27
authored
Mar 20, 2017
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mips: make copy_from_user() zero tail explicitly
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
b0bb945c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
arch/mips/include/asm/uaccess.h
arch/mips/include/asm/uaccess.h
+7
-7
No files found.
arch/mips/include/asm/uaccess.h
View file @
ab0aca27
...
...
@@ -1080,29 +1080,29 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n);
({ \
void *__cu_to; \
const void __user *__cu_from; \
long __cu_len
;
\
long __cu_len
, __cu_res;
\
\
__cu_to = (to); \
__cu_from = (from); \
__cu_
len = (n);
\
__cu_
res = __cu_len = (n);
\
\
check_object_size(__cu_to, __cu_len, false); \
\
if (eva_kernel_access()) { \
__cu_
len
= __invoke_copy_from_kernel(__cu_to, \
__cu_
res
= __invoke_copy_from_kernel(__cu_to, \
__cu_from, \
__cu_len); \
} else { \
if (access_ok(VERIFY_READ, __cu_from, __cu_len)) { \
might_fault(); \
__cu_
len
= __invoke_copy_from_user(__cu_to, \
__cu_
res
= __invoke_copy_from_user(__cu_to, \
__cu_from, \
__cu_len); \
} else { \
memset(__cu_to, 0, __cu_len); \
} \
} \
__cu_len; \
if (unlikely(__cu_res)) \
memset(__cu_to + __cu_len - __cu_res, 0, __cu_res); \
__cu_res; \
})
#define __copy_in_user(to, from, n) \
...
...
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