diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2017-04-18 12:31:01 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2017-04-18 12:31:01 +1000 |
commit | 609e7b246b39b36a304fbd5880b6a80ad60590d5 (patch) | |
tree | 6abb56474ecc32a4060f5de431d69c503be246ea /mm | |
parent | a0d6c2bd1a0ae0de2451bb308189fd2ce4ee8b59 (diff) | |
parent | 517e1fbeb65f5eade8d14f46ac365db6c75aea9b (diff) |
Merge remote-tracking branch 'kspp/for-next/kspp'
Diffstat (limited to 'mm')
-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 @@ #include <linux/sched.h> #include <linux/sched/task.h> #include <linux/sched/task_stack.h> +#include <linux/thread_info.h> #include <asm/sections.h> -enum { - BAD_STACK = -1, - NOT_STACK = 0, - GOOD_FRAME, - GOOD_STACK, -}; - /* * Checks if a given pointer and length is contained by the current * stack frame (if possible). @@ -206,17 +200,6 @@ static inline const char *check_heap_object(const void *ptr, unsigned long n, { struct page *page; - /* - * Some architectures (arm64) return true for virt_addr_valid() on - * vmalloced addresses. Work around this by checking for vmalloc - * first. - * - * We also need to check for module addresses explicitly since we - * may copy static data from modules to userspace - */ - if (is_vmalloc_or_module_addr(ptr)) - return NULL; - if (!virt_addr_valid(ptr)) return NULL; |