mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
kasan: fix incorrect arguments passing in kasan_add_zero_shadow
commit5dabd1712c
upstream. kasan_remove_zero_shadow() shall use original virtual address, start and size, instead of shadow address. Link: https://lkml.kernel.org/r/20210103063847.5963-1-lecopzer@gmail.com Fixes:0207df4fa1
("kernel/memremap, kasan: make ZONE_DEVICE with work with KASAN") Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com> Reviewed-by: Andrey Konovalov <andreyknvl@google.com> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Alexander Potapenko <glider@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ecd63f04e7
commit
fee5a83dfc
1 changed files with 1 additions and 2 deletions
|
@ -492,7 +492,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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue