Commit 430a05f9 authored by Andrey Konovalov's avatar Andrey Konovalov Committed by Linus Torvalds
Browse files

kasan: print page description after stacks

Moves page description after the stacks since it's less important.


Signed-off-by: default avatarAndrey Konovalov <>
Acked-by: default avatarDmitry Vyukov <>
Cc: Andrey Ryabinin <>
Cc: Alexander Potapenko <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 0c06f1f8
......@@ -261,9 +261,6 @@ static void print_address_description(struct kasan_access_info *info)
void *addr = (void *)info->access_addr;
struct page *page = addr_to_page(addr);
if (page)
dump_page(page, "kasan: bad access detected");
if (page && PageSlab(page)) {
......@@ -273,9 +270,14 @@ static void print_address_description(struct kasan_access_info *info)
describe_object(cache, object, addr);
if (kernel_or_module_addr(addr)) {
if (!init_task_stack_addr(addr))
pr_err("Address belongs to variable %pS\n", addr);
if (kernel_or_module_addr(addr) && !init_task_stack_addr(addr)) {
pr_err("The buggy address belongs to the variable:\n");
pr_err(" %pS\n", addr);
if (page) {
pr_err("The buggy address belongs to the page:\n");
dump_page(page, "kasan: bad access detected");
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment