[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <5233c99e63a952ead6624415dc5e213481bc6df9.1488815789.git.andreyknvl@google.com>
Date: Mon, 6 Mar 2017 17:00:09 +0100
From: Andrey Konovalov <andreyknvl@...gle.com>
To: Andrey Ryabinin <aryabinin@...tuozzo.com>,
Alexander Potapenko <glider@...gle.com>,
Dmitry Vyukov <dvyukov@...gle.com>, kasan-dev@...glegroups.com,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Cc: Andrey Konovalov <andreyknvl@...gle.com>
Subject: [PATCH v3 9/9] kasan: separate report parts by empty lines
Makes the report easier to read.
Signed-off-by: Andrey Konovalov <andreyknvl@...gle.com>
---
mm/kasan/report.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/mm/kasan/report.c b/mm/kasan/report.c
index e5b762f4a6a4..2f3ff28b4d76 100644
--- a/mm/kasan/report.c
+++ b/mm/kasan/report.c
@@ -231,7 +231,9 @@ static void describe_object(struct kmem_cache *cache, void *object,
if (cache->flags & SLAB_KASAN) {
print_track(&alloc_info->alloc_track, "Allocated");
+ pr_err("\n");
print_track(&alloc_info->free_track, "Freed");
+ pr_err("\n");
}
describe_object_addr(cache, object, addr);
@@ -242,6 +244,7 @@ static void print_address_description(void *addr)
struct page *page = addr_to_page(addr);
dump_stack();
+ pr_err("\n");
if (page && PageSlab(page)) {
struct kmem_cache *cache = page->slab_cache;
@@ -320,7 +323,9 @@ void kasan_report_double_free(struct kmem_cache *cache, void *object,
kasan_start_report(&flags);
pr_err("BUG: KASAN: double-free or invalid-free in %pS\n", ip);
+ pr_err("\n");
print_address_description(object);
+ pr_err("\n");
print_shadow_for_address(object);
kasan_end_report(&flags);
}
@@ -332,11 +337,13 @@ static void kasan_report_error(struct kasan_access_info *info)
kasan_start_report(&flags);
print_error_description(info);
+ pr_err("\n");
if (!addr_has_shadow(info)) {
dump_stack();
} else {
print_address_description((void *)info->access_addr);
+ pr_err("\n");
print_shadow_for_address(info->first_bad_addr);
}
--
2.12.0.rc1.440.g5b76565f74-goog
Powered by blists - more mailing lists