All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kasan: fix incorrect arguments passing in kasan_add_zero_shadow
@ 2021-01-03  6:38 ` Lecopzer Chen
  0 siblings, 0 replies; 4+ messages in thread
From: Lecopzer Chen @ 2021-01-03  6:38 UTC (permalink / raw)
  To: linux-kernel, linux-mm, kasan-dev
  Cc: Lecopzer Chen, glider, yj.chiang, Lecopzer Chen, linux-mediatek,
	aryabinin, dan.j.williams, akpm, dvyukov

kasan_remove_zero_shadow() shall use original virtual address, start
and size, instead of shadow address.

Fixes: 0207df4fa1a86 ("kernel/memremap, kasan: make ZONE_DEVICE with work with KASAN")
Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com>
---
 mm/kasan/init.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/mm/kasan/init.c b/mm/kasan/init.c
index bc0ad208b3a7..67051cfae41c 100644
--- a/mm/kasan/init.c
+++ b/mm/kasan/init.c
@@ -481,7 +481,6 @@ int kasan_add_zero_shadow(void *start, unsigned long size)
 
 	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;
 }
-- 
2.25.1


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-08 18:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-03  6:38 [PATCH] kasan: fix incorrect arguments passing in kasan_add_zero_shadow Lecopzer Chen
2021-01-03  6:38 ` Lecopzer Chen
2021-01-08 18:25 ` Andrey Konovalov
2021-01-08 18:25   ` Andrey Konovalov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.