--- zzzz-none-000/linux-5.4.213/mm/kasan/common.c 2022-09-15 10:04:56.000000000 +0000 +++ alder-5690pro-762/linux-5.4.213/mm/kasan/common.c 2024-08-14 09:02:12.000000000 +0000 @@ -61,6 +61,7 @@ return nr_entries; } +#ifdef CONFIG_STACKDEPOT static inline depot_stack_handle_t save_stack(gfp_t flags) { unsigned long entries[KASAN_STACK_DEPTH]; @@ -70,11 +71,14 @@ nr_entries = filter_irq_stacks(entries, nr_entries); return stack_depot_save(entries, nr_entries, flags); } +#endif static inline void set_track(struct kasan_track *track, gfp_t flags) { track->pid = current->pid; +#ifdef CONFIG_STACKDEPOT track->stack = save_stack(flags); +#endif } void kasan_enable_current(void) @@ -477,7 +481,7 @@ bool kasan_slab_free(struct kmem_cache *cache, void *object, unsigned long ip) { - return __kasan_slab_free(cache, object, ip, true); + return __kasan_slab_free(cache, object, ip, false); } static void *__kasan_kmalloc(struct kmem_cache *cache, const void *object,