diff options
author | Lecopzer Chen <[email protected]> | 2021-01-23 21:01:29 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2021-01-24 10:34:52 -0800 |
commit | 5dabd1712cd056814f9ab15f1d68157ceb04e741 (patch) | |
tree | b9aac80e0847c59635c499080a1efb29c1eaa489 | |
parent | a11a496ee6e2ab6ed850233c96b94caf042af0b9 (diff) |
kasan: fix incorrect arguments passing in kasan_add_zero_shadow
kasan_remove_zero_shadow() shall use original virtual address, start and
size, instead of shadow address.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 0207df4fa1a86 ("kernel/memremap, kasan: make ZONE_DEVICE with work with KASAN")
Signed-off-by: Lecopzer Chen <[email protected]>
Reviewed-by: Andrey Konovalov <[email protected]>
Cc: Andrey Ryabinin <[email protected]>
Cc: Dan Williams <[email protected]>
Cc: Dmitry Vyukov <[email protected]>
Cc: Alexander Potapenko <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | mm/kasan/init.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/kasan/init.c b/mm/kasan/init.c index 91049c1b8994..c4605ac9837b 100644 --- a/mm/kasan/init.c +++ b/mm/kasan/init.c @@ -486,7 +486,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; } |