aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Gouly <[email protected]>2022-03-01 15:45:18 +0000
committerWill Deacon <[email protected]>2022-03-09 12:13:37 +0000
commitd8fd5a1e78db375f2246d43df7833fec07a221cd (patch)
treec58f47ad9900f4e360d97cf23ff4a7a16f0d3abf
parent766121ba5de38a6f67980ec24a6af76c55def100 (diff)
kasan: fix a missing header include of static_keys.h
The kasan-enabled.h header relies on static keys, so make sure to include the header to avoid compilation errors (with JUMP_LABEL=n). It fixes the following: ./include/linux/kasan-enabled.h:9:1: warning: data definition has no type or storage class 9 | DECLARE_STATIC_KEY_FALSE(kasan_flag_enabled); | ^~~~~~~~~~~~~~~~~~~~~~~~ error: type defaults to 'int' in declaration of 'DECLARE_STATIC_KEY_FALSE' [-Werror=implicit-int] Fixes: f9b5e46f4097eb29 ("kasan: split kasan_*enabled() functions into a separate header") Cc: Peter Collingbourne <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Will Deacon <[email protected]> Acked-by: Andrey Konovalov <[email protected]> Signed-off-by: Joey Gouly <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
-rw-r--r--include/linux/kasan-enabled.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/kasan-enabled.h b/include/linux/kasan-enabled.h
index 4b6615375022..6f612d69ea0c 100644
--- a/include/linux/kasan-enabled.h
+++ b/include/linux/kasan-enabled.h
@@ -2,6 +2,8 @@
#ifndef _LINUX_KASAN_ENABLED_H
#define _LINUX_KASAN_ENABLED_H
+#include <linux/static_key.h>
+
#ifdef CONFIG_KASAN_HW_TAGS
DECLARE_STATIC_KEY_FALSE(kasan_flag_enabled);