diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-08-11 07:27:47 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-11 07:27:47 -0400 |
commit | c4c0c56a7a85ed5725786219e4fbca7e840b1531 (patch) | |
tree | c9d6b35a571fd5e80ddf5bf4a60142480eaa18d8 /kernel/panic.c | |
parent | 5127bed588a2f8f3a1f732de2a8a190b7df5dce3 (diff) | |
parent | 796aadeb1b2db9b5d463946766c5bbfd7717158c (diff) |
Merge branch 'linus' into core/rcu
Diffstat (limited to 'kernel/panic.c')
-rw-r--r-- | kernel/panic.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/kernel/panic.c b/kernel/panic.c index 425567f45b9f..12c5a0a6c89b 100644 --- a/kernel/panic.c +++ b/kernel/panic.c | |||
@@ -318,6 +318,28 @@ void warn_on_slowpath(const char *file, int line) | |||
318 | add_taint(TAINT_WARN); | 318 | add_taint(TAINT_WARN); |
319 | } | 319 | } |
320 | EXPORT_SYMBOL(warn_on_slowpath); | 320 | EXPORT_SYMBOL(warn_on_slowpath); |
321 | |||
322 | |||
323 | void warn_slowpath(const char *file, int line, const char *fmt, ...) | ||
324 | { | ||
325 | va_list args; | ||
326 | char function[KSYM_SYMBOL_LEN]; | ||
327 | unsigned long caller = (unsigned long)__builtin_return_address(0); | ||
328 | sprint_symbol(function, caller); | ||
329 | |||
330 | printk(KERN_WARNING "------------[ cut here ]------------\n"); | ||
331 | printk(KERN_WARNING "WARNING: at %s:%d %s()\n", file, | ||
332 | line, function); | ||
333 | va_start(args, fmt); | ||
334 | vprintk(fmt, args); | ||
335 | va_end(args); | ||
336 | |||
337 | print_modules(); | ||
338 | dump_stack(); | ||
339 | print_oops_end_marker(); | ||
340 | add_taint(TAINT_WARN); | ||
341 | } | ||
342 | EXPORT_SYMBOL(warn_slowpath); | ||
321 | #endif | 343 | #endif |
322 | 344 | ||
323 | #ifdef CONFIG_CC_STACKPROTECTOR | 345 | #ifdef CONFIG_CC_STACKPROTECTOR |