Skip to content

Commit

Permalink
kasan: cosmetic changes in report.c
Browse files Browse the repository at this point in the history
Do a few non-functional style fixes for the code in report.c.

Link: https://lkml.kernel.org/r/b728eae71f3ea505a885449724de21cf3f476a7b.1662411799.git.andreyknvl@google.com
Signed-off-by: Andrey Konovalov <[email protected]>
Reviewed-by: Marco Elver <[email protected]>
Cc: Alexander Potapenko <[email protected]>
Cc: Andrey Ryabinin <[email protected]>
Cc: Dmitry Vyukov <[email protected]>
Cc: Evgenii Stepanov <[email protected]>
Cc: Peter Collingbourne <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
xairy authored and akpm00 committed Oct 3, 2022
1 parent b89933e commit 9ef08d2
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions mm/kasan/report.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,25 +200,22 @@ static void print_error_description(struct kasan_report_info *info)
static void print_track(struct kasan_track *track, const char *prefix)
{
pr_err("%s by task %u:\n", prefix, track->pid);
if (track->stack) {
if (track->stack)
stack_depot_print(track->stack);
} else {
else
pr_err("(stack is not available)\n");
}
}

struct page *kasan_addr_to_page(const void *addr)
{
if ((addr >= (void *)PAGE_OFFSET) &&
(addr < high_memory))
if ((addr >= (void *)PAGE_OFFSET) && (addr < high_memory))
return virt_to_head_page(addr);
return NULL;
}

struct slab *kasan_addr_to_slab(const void *addr)
{
if ((addr >= (void *)PAGE_OFFSET) &&
(addr < high_memory))
if ((addr >= (void *)PAGE_OFFSET) && (addr < high_memory))
return virt_to_slab(addr);
return NULL;
}
Expand Down

0 comments on commit 9ef08d2

Please sign in to comment.