]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mm: kasan: fix input of vmalloc_to_page()
authorKefeng Wang <wangkefeng.wang@huawei.com>
Wed, 25 May 2022 12:08:04 +0000 (20:08 +0800)
committerakpm <akpm@linux-foundation.org>
Fri, 27 May 2022 16:33:46 +0000 (09:33 -0700)
When print virtual mapping info for vmalloc address, it should pass
the addr not page, fix it.

Link: https://lkml.kernel.org/r/20220525120804.38155-1-wangkefeng.wang@huawei.com
Fixes: 15fefde98845 ("kasan: print virtual mapping info in reports")
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/kasan/report.c

index 199d77cce21a34948b739e43049b8fb3ccb80a96..b341a191651d36df9f11810f47035ef388d7ba51 100644 (file)
@@ -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);
                }
        }