Skip to content

Commit 00be875

Browse files
rpptmcgrof
authored andcommitted
arm64: module: remove unneeded call to kasan_alloc_module_shadow()
Since commit f6f37d9 ("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) <[email protected]> Signed-off-by: Luis Chamberlain <[email protected]>
1 parent 086437d commit 00be875

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

arch/arm64/kernel/module.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,6 @@ void *module_alloc(unsigned long size)
141141
__func__);
142142
}
143143

144-
if (p && (kasan_alloc_module_shadow(p, size, GFP_KERNEL) < 0)) {
145-
vfree(p);
146-
return NULL;
147-
}
148-
149144
/* Memory is intended to be executable, reset the pointer tag. */
150145
return kasan_reset_tag(p);
151146
}

0 commit comments

Comments
 (0)