diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-08-11 13:27:47 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-11 13:27:47 +0200 |
commit | c4c0c56a7a85ed5725786219e4fbca7e840b1531 (patch) | |
tree | c9d6b35a571fd5e80ddf5bf4a60142480eaa18d8 /kernel/panic.c | |
parent | 5127bed588a2f8f3a1f732de2a8a190b7df5dce3 (diff) | |
parent | 796aadeb1b2db9b5d463946766c5bbfd7717158c (diff) | |
download | kernel_goldelico_gta04-c4c0c56a7a85ed5725786219e4fbca7e840b1531.zip kernel_goldelico_gta04-c4c0c56a7a85ed5725786219e4fbca7e840b1531.tar.gz kernel_goldelico_gta04-c4c0c56a7a85ed5725786219e4fbca7e840b1531.tar.bz2 |
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 425567f..12c5a0a 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -318,6 +318,28 @@ void warn_on_slowpath(const char *file, int line) add_taint(TAINT_WARN); } EXPORT_SYMBOL(warn_on_slowpath); + + +void warn_slowpath(const char *file, int line, const char *fmt, ...) +{ + va_list args; + char function[KSYM_SYMBOL_LEN]; + unsigned long caller = (unsigned long)__builtin_return_address(0); + sprint_symbol(function, caller); + + printk(KERN_WARNING "------------[ cut here ]------------\n"); + printk(KERN_WARNING "WARNING: at %s:%d %s()\n", file, + line, function); + va_start(args, fmt); + vprintk(fmt, args); + va_end(args); + + print_modules(); + dump_stack(); + print_oops_end_marker(); + add_taint(TAINT_WARN); +} +EXPORT_SYMBOL(warn_slowpath); #endif #ifdef CONFIG_CC_STACKPROTECTOR |