[PATCH v1 -next] kasan: fix a missing header include of static_keys.h
Catalin Marinas
catalin.marinas at arm.com
Wed Mar 2 03:16:08 PST 2022
On Tue, Mar 01, 2022 at 03:45:18PM +0000, Joey Gouly wrote:
> 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: f9b5e46f4097 ("kasan: split kasan_*enabled() functions into a separate header")
> Cc: Peter Collingbourne <pcc at google.com>
> Cc: Mark Rutland <mark.rutland at arm.com>
> Cc: Catalin Marinas <catalin.marinas at arm.com>
> Cc: Will Deacon <will at kernel.org>
> ---
> include/linux/kasan-enabled.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> 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);
The patch looks fine but you should cc the kasan maintainers (just run
the patch through scripts/get_maintainer.pl). Adding Andrey as he acked
the patch being fixed here.
--
Catalin
More information about the linux-arm-kernel
mailing list