aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Elver <[email protected]>2021-07-14 21:26:40 -0700
committerLinus Torvalds <[email protected]>2021-07-15 10:13:49 -0700
commit2db710cc846d3321a4dc0977fa13769bddba2351 (patch)
treea172e7afe4d7965821580c888cc2aaf41d25e421
parent77a63c69ec43f4dc28f4b2d1c933c39e55de6ad8 (diff)
kasan: fix build by including kernel.h
The <linux/kasan.h> header relies on _RET_IP_ being defined, and had been receiving that definition via inclusion of bug.h which includes kernel.h. However, since f39650de687e ("kernel.h: split out panic and oops helpers") that is no longer the case and get the following build error when building CONFIG_KASAN_HW_TAGS on arm64: In file included from arch/arm64/mm/kasan_init.c:10: include/linux/kasan.h: In function 'kasan_slab_free': include/linux/kasan.h:230:39: error: '_RET_IP_' undeclared (first use in this function) 230 | return __kasan_slab_free(s, object, _RET_IP_, init); Fix it by including kernel.h from kasan.h. Link: https://lkml.kernel.org/r/[email protected] Fixes: f39650de687e ("kernel.h: split out panic and oops helpers") Signed-off-by: Marco Elver <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Andrey Konovalov <[email protected]> Cc: Alexander Potapenko <[email protected]> Cc: Dmitry Vyukov <[email protected]> Cc: Peter Collingbourne <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Vincenzo Frascino <[email protected]> Cc: Andrey Ryabinin <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--include/linux/kasan.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/kasan.h b/include/linux/kasan.h
index 5310e217bd74..dd874a1ee862 100644
--- a/include/linux/kasan.h
+++ b/include/linux/kasan.h
@@ -3,6 +3,7 @@
#define _LINUX_KASAN_H
#include <linux/bug.h>
+#include <linux/kernel.h>
#include <linux/static_key.h>
#include <linux/types.h>