diff options
Diffstat (limited to 'mm/usercopy.c')
-rw-r--r-- | mm/usercopy.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/mm/usercopy.c b/mm/usercopy.c index d155e12563b1..a9852b24715d 100644 --- a/mm/usercopy.c +++ b/mm/usercopy.c | |||
@@ -19,15 +19,9 @@ | |||
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/sched/task.h> | 20 | #include <linux/sched/task.h> |
21 | #include <linux/sched/task_stack.h> | 21 | #include <linux/sched/task_stack.h> |
22 | #include <linux/thread_info.h> | ||
22 | #include <asm/sections.h> | 23 | #include <asm/sections.h> |
23 | 24 | ||
24 | enum { | ||
25 | BAD_STACK = -1, | ||
26 | NOT_STACK = 0, | ||
27 | GOOD_FRAME, | ||
28 | GOOD_STACK, | ||
29 | }; | ||
30 | |||
31 | /* | 25 | /* |
32 | * Checks if a given pointer and length is contained by the current | 26 | * Checks if a given pointer and length is contained by the current |
33 | * stack frame (if possible). | 27 | * stack frame (if possible). |
@@ -206,17 +200,6 @@ static inline const char *check_heap_object(const void *ptr, unsigned long n, | |||
206 | { | 200 | { |
207 | struct page *page; | 201 | struct page *page; |
208 | 202 | ||
209 | /* | ||
210 | * Some architectures (arm64) return true for virt_addr_valid() on | ||
211 | * vmalloced addresses. Work around this by checking for vmalloc | ||
212 | * first. | ||
213 | * | ||
214 | * We also need to check for module addresses explicitly since we | ||
215 | * may copy static data from modules to userspace | ||
216 | */ | ||
217 | if (is_vmalloc_or_module_addr(ptr)) | ||
218 | return NULL; | ||
219 | |||
220 | if (!virt_addr_valid(ptr)) | 203 | if (!virt_addr_valid(ptr)) |
221 | return NULL; | 204 | return NULL; |
222 | 205 | ||