aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bug.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-06-08 14:31:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-08 14:31:16 -0400
commit3f17ea6dea8ba5668873afa54628a91aaa3fb1c0 (patch)
treeafbeb2accd4c2199ddd705ae943995b143a0af02 /lib/bug.c
parent1860e379875dfe7271c649058aeddffe5afd9d0d (diff)
parent1a5700bc2d10cd379a795fd2bb377a190af5acd4 (diff)
Merge branch 'next' (accumulated 3.16 merge window patches) into master
Now that 3.15 is released, this merges the 'next' branch into 'master', bringing us to the normal situation where my 'master' branch is the merge window. * accumulated work in next: (6809 commits) ufs: sb mutex merge + mutex_destroy powerpc: update comments for generic idle conversion cris: update comments for generic idle conversion idle: remove cpu_idle() forward declarations nbd: zero from and len fields in NBD_CMD_DISCONNECT. mm: convert some level-less printks to pr_* MAINTAINERS: adi-buildroot-devel is moderated MAINTAINERS: add linux-api for review of API/ABI changes mm/kmemleak-test.c: use pr_fmt for logging fs/dlm/debug_fs.c: replace seq_printf by seq_puts fs/dlm/lockspace.c: convert simple_str to kstr fs/dlm/config.c: convert simple_str to kstr mm: mark remap_file_pages() syscall as deprecated mm: memcontrol: remove unnecessary memcg argument from soft limit functions mm: memcontrol: clean up memcg zoneinfo lookup mm/memblock.c: call kmemleak directly from memblock_(alloc|free) mm/mempool.c: update the kmemleak stack trace for mempool allocations lib/radix-tree.c: update the kmemleak stack trace for radix tree allocations mm: introduce kmemleak_update_trace() mm/kmemleak.c: use %u to print ->checksum ...
Diffstat (limited to 'lib/bug.c')
-rw-r--r--lib/bug.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/lib/bug.c b/lib/bug.c
index 168603477f02..d1d7c7878900 100644
--- a/lib/bug.c
+++ b/lib/bug.c
@@ -37,6 +37,9 @@
37 37
38 Jeremy Fitzhardinge <jeremy@goop.org> 2006 38 Jeremy Fitzhardinge <jeremy@goop.org> 2006
39 */ 39 */
40
41#define pr_fmt(fmt) fmt
42
40#include <linux/list.h> 43#include <linux/list.h>
41#include <linux/module.h> 44#include <linux/module.h>
42#include <linux/kernel.h> 45#include <linux/kernel.h>
@@ -153,15 +156,13 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
153 156
154 if (warning) { 157 if (warning) {
155 /* this is a WARN_ON rather than BUG/BUG_ON */ 158 /* this is a WARN_ON rather than BUG/BUG_ON */
156 printk(KERN_WARNING "------------[ cut here ]------------\n"); 159 pr_warn("------------[ cut here ]------------\n");
157 160
158 if (file) 161 if (file)
159 printk(KERN_WARNING "WARNING: at %s:%u\n", 162 pr_warn("WARNING: at %s:%u\n", file, line);
160 file, line);
161 else 163 else
162 printk(KERN_WARNING "WARNING: at %p " 164 pr_warn("WARNING: at %p [verbose debug info unavailable]\n",
163 "[verbose debug info unavailable]\n", 165 (void *)bugaddr);
164 (void *)bugaddr);
165 166
166 print_modules(); 167 print_modules();
167 show_regs(regs); 168 show_regs(regs);
@@ -174,12 +175,10 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
174 printk(KERN_DEFAULT "------------[ cut here ]------------\n"); 175 printk(KERN_DEFAULT "------------[ cut here ]------------\n");
175 176
176 if (file) 177 if (file)
177 printk(KERN_CRIT "kernel BUG at %s:%u!\n", 178 pr_crit("kernel BUG at %s:%u!\n", file, line);
178 file, line);
179 else 179 else
180 printk(KERN_CRIT "Kernel BUG at %p " 180 pr_crit("Kernel BUG at %p [verbose debug info unavailable]\n",
181 "[verbose debug info unavailable]\n", 181 (void *)bugaddr);
182 (void *)bugaddr);
183 182
184 return BUG_TRAP_TYPE_BUG; 183 return BUG_TRAP_TYPE_BUG;
185} 184}