* [PATCH] mm: kasan: Fix input of vmalloc_to_page()
@ 2022-05-25 12:08 Kefeng Wang
2022-05-25 17:43 ` Andrey Konovalov
0 siblings, 1 reply; 2+ messages in thread
From: Kefeng Wang @ 2022-05-25 12:08 UTC (permalink / raw)
To: Andrey Ryabinin, Alexander Potapenko, Andrey Konovalov,
Dmitry Vyukov, Vincenzo Frascino, kasan-dev, linux-mm,
linux-kernel
Cc: Andrew Morton, Kefeng Wang
When print virtual mapping info for vmalloc address, it should pass
the addr not page, fix it.
Fixes: c056a364e954 ("kasan: print virtual mapping info in reports")
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
mm/kasan/report.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/kasan/report.c b/mm/kasan/report.c
index 199d77cce21a..b341a191651d 100644
--- a/mm/kasan/report.c
+++ b/mm/kasan/report.c
@@ -347,7 +347,7 @@ static void print_address_description(void *addr, u8 tag)
va->addr, va->addr + va->size, va->caller);
pr_err("\n");
- page = vmalloc_to_page(page);
+ page = vmalloc_to_page(addr);
}
}
--
2.35.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mm: kasan: Fix input of vmalloc_to_page()
2022-05-25 12:08 [PATCH] mm: kasan: Fix input of vmalloc_to_page() Kefeng Wang
@ 2022-05-25 17:43 ` Andrey Konovalov
0 siblings, 0 replies; 2+ messages in thread
From: Andrey Konovalov @ 2022-05-25 17:43 UTC (permalink / raw)
To: Kefeng Wang
Cc: Andrey Ryabinin, Alexander Potapenko, Dmitry Vyukov,
Vincenzo Frascino, kasan-dev, Linux Memory Management List, LKML,
Andrew Morton
On Wed, May 25, 2022 at 1:58 PM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>
> When print virtual mapping info for vmalloc address, it should pass
> the addr not page, fix it.
>
> Fixes: c056a364e954 ("kasan: print virtual mapping info in reports")
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
> mm/kasan/report.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/kasan/report.c b/mm/kasan/report.c
> index 199d77cce21a..b341a191651d 100644
> --- a/mm/kasan/report.c
> +++ b/mm/kasan/report.c
> @@ -347,7 +347,7 @@ static void print_address_description(void *addr, u8 tag)
> va->addr, va->addr + va->size, va->caller);
> pr_err("\n");
>
> - page = vmalloc_to_page(page);
> + page = vmalloc_to_page(addr);
> }
> }
>
> --
> 2.35.3
>
Nice catch, thanks!
Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-25 17:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-25 12:08 [PATCH] mm: kasan: Fix input of vmalloc_to_page() Kefeng Wang
2022-05-25 17:43 ` Andrey Konovalov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).