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
aace880f
Commit
aace880f
authored
Aug 20, 2016
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parisc: fix copy_from_user()
Cc: stable@vger.kernel.org Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
acb2505d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
arch/parisc/include/asm/uaccess.h
arch/parisc/include/asm/uaccess.h
+4
-2
No files found.
arch/parisc/include/asm/uaccess.h
View file @
aace880f
...
...
@@ -10,6 +10,7 @@
#include <asm-generic/uaccess-unaligned.h>
#include <linux/bug.h>
#include <linux/string.h>
#define VERIFY_READ 0
#define VERIFY_WRITE 1
...
...
@@ -221,13 +222,14 @@ static inline unsigned long __must_check copy_from_user(void *to,
unsigned
long
n
)
{
int
sz
=
__compiletime_object_size
(
to
);
int
ret
=
-
EFAULT
;
unsigned
long
ret
=
n
;
if
(
likely
(
sz
==
-
1
||
!
__builtin_constant_p
(
n
)
||
sz
>=
n
))
ret
=
__copy_from_user
(
to
,
from
,
n
);
else
copy_from_user_overflow
();
if
(
unlikely
(
ret
))
memset
(
to
+
(
n
-
ret
),
0
,
ret
);
return
ret
;
}
...
...
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