summaryrefslogtreecommitdiffstats
path: root/mm/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/util.c')
-rw-r--r--mm/util.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/mm/util.c b/mm/util.c
index 34e57fae959d..4b93ffa6df96 100644
--- a/mm/util.c
+++ b/mm/util.c
@@ -156,12 +156,7 @@ void *memdup_user(const void __user *src, size_t len)
156{ 156{
157 void *p; 157 void *p;
158 158
159 /* 159 p = kmalloc_track_caller(len, GFP_USER);
160 * Always use GFP_KERNEL, since copy_from_user() can sleep and
161 * cause pagefault, which makes it pointless to use GFP_NOFS
162 * or GFP_ATOMIC.
163 */
164 p = kmalloc_track_caller(len, GFP_KERNEL);
165 if (!p) 160 if (!p)
166 return ERR_PTR(-ENOMEM); 161 return ERR_PTR(-ENOMEM);
167 162