summaryrefslogtreecommitdiffstats
path: root/mm/kasan/common.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2023-02-10 15:34:48 -0800
committerAndrew Morton <akpm@linux-foundation.org>2023-02-10 15:34:48 -0800
commitf67d6b26649379f8520abe6a6c7ed335310bf01e (patch)
treec161fce6517753dcacdcea21804f6e2c90164a33 /mm/kasan/common.c
parent223ec6ab265ead0b319bc2f15d0d1be05078a74b (diff)
parentce4d9a1ea35ac5429e822c4106cb2859d5c71f3e (diff)
downloadlinux-f67d6b26649379f8520abe6a6c7ed335310bf01e.tar.gz
linux-f67d6b26649379f8520abe6a6c7ed335310bf01e.tar.bz2
linux-f67d6b26649379f8520abe6a6c7ed335310bf01e.zip
Merge branch 'mm-hotfixes-stable' into mm-stable
To pick up depended-upon changes
Diffstat (limited to 'mm/kasan/common.c')
-rw-r--r--mm/kasan/common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/kasan/common.c b/mm/kasan/common.c
index 6b8e9c848573..1e7336ae3786 100644
--- a/mm/kasan/common.c
+++ b/mm/kasan/common.c
@@ -246,6 +246,9 @@ bool __kasan_slab_free(struct kmem_cache *cache, void *object,
static inline bool ____kasan_kfree_large(void *ptr, unsigned long ip)
{
+ if (!kasan_arch_is_ready())
+ return false;
+
if (ptr != page_address(virt_to_head_page(ptr))) {
kasan_report_invalid_free(ptr, ip, KASAN_REPORT_INVALID_FREE);
return true;