diff options
author | Andrey Konovalov <andreyknvl@google.com> | 2017-05-03 17:56:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-03 18:52:12 -0400 |
commit | b19385993623c1a18a686b6b271cd24d5aa96f52 (patch) | |
tree | 3a9531a0b1f0a99e88da59357d48366bc1dc8513 | |
parent | 5ab6d91ac998158d04f9563335aa5f1409eda971 (diff) |
kasan: separate report parts by empty lines
Makes the report easier to read.
Link: http://lkml.kernel.org/r/20170302134851.101218-10-andreyknvl@google.com
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Acked-by: Dmitry Vyukov <dvyukov@google.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Alexander Potapenko <glider@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | mm/kasan/report.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/kasan/report.c b/mm/kasan/report.c index 7d3d9670e233..beee0e980e2d 100644 --- a/mm/kasan/report.c +++ b/mm/kasan/report.c | |||
@@ -237,7 +237,9 @@ static void describe_object(struct kmem_cache *cache, void *object, | |||
237 | 237 | ||
238 | if (cache->flags & SLAB_KASAN) { | 238 | if (cache->flags & SLAB_KASAN) { |
239 | print_track(&alloc_info->alloc_track, "Allocated"); | 239 | print_track(&alloc_info->alloc_track, "Allocated"); |
240 | pr_err("\n"); | ||
240 | print_track(&alloc_info->free_track, "Freed"); | 241 | print_track(&alloc_info->free_track, "Freed"); |
242 | pr_err("\n"); | ||
241 | } | 243 | } |
242 | 244 | ||
243 | describe_object_addr(cache, object, addr); | 245 | describe_object_addr(cache, object, addr); |
@@ -248,6 +250,7 @@ static void print_address_description(void *addr) | |||
248 | struct page *page = addr_to_page(addr); | 250 | struct page *page = addr_to_page(addr); |
249 | 251 | ||
250 | dump_stack(); | 252 | dump_stack(); |
253 | pr_err("\n"); | ||
251 | 254 | ||
252 | if (page && PageSlab(page)) { | 255 | if (page && PageSlab(page)) { |
253 | struct kmem_cache *cache = page->slab_cache; | 256 | struct kmem_cache *cache = page->slab_cache; |
@@ -326,7 +329,9 @@ void kasan_report_double_free(struct kmem_cache *cache, void *object, | |||
326 | 329 | ||
327 | kasan_start_report(&flags); | 330 | kasan_start_report(&flags); |
328 | pr_err("BUG: KASAN: double-free or invalid-free in %pS\n", ip); | 331 | pr_err("BUG: KASAN: double-free or invalid-free in %pS\n", ip); |
332 | pr_err("\n"); | ||
329 | print_address_description(object); | 333 | print_address_description(object); |
334 | pr_err("\n"); | ||
330 | print_shadow_for_address(object); | 335 | print_shadow_for_address(object); |
331 | kasan_end_report(&flags); | 336 | kasan_end_report(&flags); |
332 | } | 337 | } |
@@ -338,11 +343,13 @@ static void kasan_report_error(struct kasan_access_info *info) | |||
338 | kasan_start_report(&flags); | 343 | kasan_start_report(&flags); |
339 | 344 | ||
340 | print_error_description(info); | 345 | print_error_description(info); |
346 | pr_err("\n"); | ||
341 | 347 | ||
342 | if (!addr_has_shadow(info)) { | 348 | if (!addr_has_shadow(info)) { |
343 | dump_stack(); | 349 | dump_stack(); |
344 | } else { | 350 | } else { |
345 | print_address_description((void *)info->access_addr); | 351 | print_address_description((void *)info->access_addr); |
352 | pr_err("\n"); | ||
346 | print_shadow_for_address(info->first_bad_addr); | 353 | print_shadow_for_address(info->first_bad_addr); |
347 | } | 354 | } |
348 | 355 | ||