mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
FROMLIST: 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, sincef39650de68that 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://lore.kernel.org/lkml/20210705072716.2125074-1-elver@google.com Fixes:f39650de68("kernel.h: split out panic and oops helpers") Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Marco Elver <elver@google.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Change-Id: Id606931c32b16650e691ee60cb615dc37ea4a459
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user