summaryrefslogtreecommitdiff
path: root/mm/kasan/report.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/kasan/report.c')
-rw-r--r--mm/kasan/report.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/mm/kasan/report.c b/mm/kasan/report.c
index ded648c0a0e4..d60ee8b81e2b 100644
--- a/mm/kasan/report.c
+++ b/mm/kasan/report.c
@@ -259,6 +259,15 @@ static void print_address_description(void *addr, u8 tag)
pr_err("\n");
}
+ if (object_is_on_stack(addr)) {
+ /*
+ * Currently, KASAN supports printing frame information only
+ * for accesses to the task's own stack.
+ */
+ kasan_print_address_stack_frame(addr);
+ pr_err("\n");
+ }
+
if (is_vmalloc_addr(addr)) {
struct vm_struct *va = find_vm_area(addr);
@@ -278,9 +287,6 @@ static void print_address_description(void *addr, u8 tag)
dump_page(page, "kasan: bad access detected");
pr_err("\n");
}
-
- kasan_print_address_stack_frame(addr);
- pr_err("\n");
}
static bool meta_row_is_guilty(const void *row, const void *addr)