From: Aneesh Kumar K.V Date: Fri, 6 Nov 2015 02:50:46 +0000 (-0800) Subject: mm/kasan: MODULE_VADDR is not available on all archs X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=527f215b78976e94995dce7163b07539b576d519;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git mm/kasan: MODULE_VADDR is not available on all archs Use is_module_address instead Signed-off-by: Aneesh Kumar K.V Reviewed-by: Andrey Ryabinin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/kasan/report.c b/mm/kasan/report.c index 6c3f82b0240b..d269f2087faf 100644 --- a/mm/kasan/report.c +++ b/mm/kasan/report.c @@ -22,6 +22,7 @@ #include #include #include +#include #include @@ -85,9 +86,11 @@ static void print_error_description(struct kasan_access_info *info) static inline bool kernel_or_module_addr(const void *addr) { - return (addr >= (void *)_stext && addr < (void *)_end) - || (addr >= (void *)MODULES_VADDR - && addr < (void *)MODULES_END); + if (addr >= (void *)_stext && addr < (void *)_end) + return true; + if (is_module_address((unsigned long)addr)) + return true; + return false; } static inline bool init_task_stack_addr(const void *addr)