--- a/mm/kasan/init.c +++ b/mm/kasan/init.c @@ -503,7 +503,6 @@ int kasan_add_zero_shadow(void *start, u ret = kasan_populate_early_shadow(shadow_start, shadow_end); if (ret) - kasan_remove_zero_shadow(shadow_start, - size >> KASAN_SHADOW_SCALE_SHIFT); + kasan_remove_zero_shadow(start, size); return ret; }