OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
105f2b7
)
memdup_user(): switch to GFP_USER
author
Al Viro
<viro@zeniv.linux.org.uk>
Sun, 7 Jan 2018 18:00:27 +0000
(13:00 -0500)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Sun, 7 Jan 2018 18:00:27 +0000
(13:00 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
mm/util.c
patch
|
blob
|
history
diff --git
a/mm/util.c
b/mm/util.c
index
34e57fa
..
4b93ffa
100644
(file)
--- a/
mm/util.c
+++ b/
mm/util.c
@@
-156,12
+156,7
@@
void *memdup_user(const void __user *src, size_t len)
{
void *p;
- /*
- * Always use GFP_KERNEL, since copy_from_user() can sleep and
- * cause pagefault, which makes it pointless to use GFP_NOFS
- * or GFP_ATOMIC.
- */
- p = kmalloc_track_caller(len, GFP_KERNEL);
+ p = kmalloc_track_caller(len, GFP_USER);
if (!p)
return ERR_PTR(-ENOMEM);