summaryrefslogtreecommitdiff
path: root/lib/bug.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-03-09 16:42:25 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2018-03-09 16:42:25 -0800
commitcfc79ae844d835b6eda5de199dd08c84cc4e6087 (patch)
treeeb99a85c6ce9b2b7ad205bd10bac6ab65bb5cd98 /lib/bug.c
parentc68a2cf07ad726c09a8724258e25ca9400fdf9ee (diff)
parentac68b1b3b9c73e652dc7ce0585672e23c5a2dca4 (diff)
Merge branch 'akpm' (patches from Andrew)
Merge misc fixes from Andrew Morton: "8 fixes" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: lib/test_kmod.c: fix limit check on number of test devices created selftests/vm/run_vmtests: adjust hugetlb size according to nr_cpus mm/page_alloc: fix memmap_init_zone pageblock alignment mm/memblock.c: hardcode the end_pfn being -1 mm/gup.c: teach get_user_pages_unlocked to handle FOLL_NOWAIT lib/bug.c: exclude non-BUG/WARN exceptions from report_bug() bug: use %pB in BUG and stack protector failure hugetlb: fix surplus pages accounting
Diffstat (limited to 'lib/bug.c')
-rw-r--r--lib/bug.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bug.c b/lib/bug.c
index c1b0fad31b10..1077366f496b 100644
--- a/lib/bug.c
+++ b/lib/bug.c
@@ -150,6 +150,8 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
return BUG_TRAP_TYPE_NONE;
bug = find_bug(bugaddr);
+ if (!bug)
+ return BUG_TRAP_TYPE_NONE;
file = NULL;
line = 0;
@@ -191,7 +193,7 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
if (file)
pr_crit("kernel BUG at %s:%u!\n", file, line);
else
- pr_crit("Kernel BUG at %p [verbose debug info unavailable]\n",
+ pr_crit("Kernel BUG at %pB [verbose debug info unavailable]\n",
(void *)bugaddr);
return BUG_TRAP_TYPE_BUG;