Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm64: module: remove unneeded call to kasan_alloc_module_shadow()

Since commit f6f37d9320a1 ("arm64: select KASAN_VMALLOC for SW/HW_TAGS
modes") KASAN_VMALLOC is always enabled when KASAN is on. This means
that allocations in module_alloc() will be tracked by KASAN protection
for vmalloc() and that kasan_alloc_module_shadow() will be always an
empty inline and there is no point in calling it.

Drop meaningless call to kasan_alloc_module_shadow() from
module_alloc().

Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>

authored by

Mike Rapoport (IBM) and committed by
Luis Chamberlain
00be8758 086437d9

-5
-5
arch/arm64/kernel/module.c
··· 141 141 __func__); 142 142 } 143 143 144 - if (p && (kasan_alloc_module_shadow(p, size, GFP_KERNEL) < 0)) { 145 - vfree(p); 146 - return NULL; 147 - } 148 - 149 144 /* Memory is intended to be executable, reset the pointer tag. */ 150 145 return kasan_reset_tag(p); 151 146 }