diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-09-21 15:01:57 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-09-21 15:01:57 +0200 |
commit | 580498a23be1de55be55147eaee20a69249aeb13 (patch) | |
tree | 345f1a280812bf15969ae7097583b7dd59482636 /mm/usercopy.c | |
parent | 3ec979658e5cc0fab86a42af79a650299e4d7135 (diff) | |
parent | 7d1e042314619115153a0f6f06e4552c09a50e13 (diff) |
Merge branch 'linus' into x86/boot, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'mm/usercopy.c')
-rw-r--r-- | mm/usercopy.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mm/usercopy.c b/mm/usercopy.c index 089328f2b920..3c8da0af9695 100644 --- a/mm/usercopy.c +++ b/mm/usercopy.c @@ -207,8 +207,11 @@ static inline const char *check_heap_object(const void *ptr, unsigned long n, * 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_addr(ptr)) + if (is_vmalloc_or_module_addr(ptr)) return NULL; if (!virt_addr_valid(ptr)) |