summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/usercopy.c5
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,
207 * Some architectures (arm64) return true for virt_addr_valid() on 207 * Some architectures (arm64) return true for virt_addr_valid() on
208 * vmalloced addresses. Work around this by checking for vmalloc 208 * vmalloced addresses. Work around this by checking for vmalloc
209 * first. 209 * first.
210 *
211 * We also need to check for module addresses explicitly since we
212 * may copy static data from modules to userspace
210 */ 213 */
211 if (is_vmalloc_addr(ptr)) 214 if (is_vmalloc_or_module_addr(ptr))
212 return NULL; 215 return NULL;
213 216
214 if (!virt_addr_valid(ptr)) 217 if (!virt_addr_valid(ptr))