]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - mm/usercopy.c
nfsd4: properly type op_get_currentstateid callbacks
[karo-tx-linux.git] / mm / usercopy.c
index d155e12563b139a9879bbc370902ea85a84bd0f3..a9852b24715d25598a7603560ffc042ca0153a2b 100644 (file)
 #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;