Skip to contentSkip to conversation

mm: kasan: Fix input of vmalloc_to_page()

PATCH Applied Kefeng Wang 2 participants 2 messages May 25, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: kasan: Fix input of vmalloc_to_page()

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")
---
 mm/kasan/report.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/kasan/report.c +1 -1
index 199d77cce21a..b341a191651d 100644
@@ -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);
 		}
 	}
 
Signature · 1 line
2.35.3
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 24 lines · 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")
---
 mm/kasan/report.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/kasan/report.c +1 -2
index 199d77cce21a..b341a191651d 100644
@@ -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);
                }
        }
 
--
Quoted 2 lines

2.35.3

Nice catch, thanks!