aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/panic.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-10-15 07:46:29 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-15 07:46:29 -0400
commitb2aaf8f74cdc84a9182f6cabf198b7763bcb9d40 (patch)
tree53ccb1c2c14751fe69cf93102e76e97021f6df07 /kernel/panic.c
parent4f962d4d65923d7b722192e729840cfb79af0a5a (diff)
parent278429cff8809958d25415ba0ed32b59866ab1a8 (diff)
Merge branch 'linus' into stackprotector
Conflicts: arch/x86/kernel/Makefile include/asm-x86/pda.h
Diffstat (limited to 'kernel/panic.c')
-rw-r--r--kernel/panic.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/kernel/panic.c b/kernel/panic.c
index c35c9eca3eb2..e0a87bb025c0 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -321,6 +321,28 @@ void warn_on_slowpath(const char *file, int line)
321 add_taint(TAINT_WARN); 321 add_taint(TAINT_WARN);
322} 322}
323EXPORT_SYMBOL(warn_on_slowpath); 323EXPORT_SYMBOL(warn_on_slowpath);
324
325
326void warn_slowpath(const char *file, int line, const char *fmt, ...)
327{
328 va_list args;
329 char function[KSYM_SYMBOL_LEN];
330 unsigned long caller = (unsigned long)__builtin_return_address(0);
331 sprint_symbol(function, caller);
332
333 printk(KERN_WARNING "------------[ cut here ]------------\n");
334 printk(KERN_WARNING "WARNING: at %s:%d %s()\n", file,
335 line, function);
336 va_start(args, fmt);
337 vprintk(fmt, args);
338 va_end(args);
339
340 print_modules();
341 dump_stack();
342 print_oops_end_marker();
343 add_taint(TAINT_WARN);
344}
345EXPORT_SYMBOL(warn_slowpath);
324#endif 346#endif
325 347
326#ifdef CONFIG_CC_STACKPROTECTOR 348#ifdef CONFIG_CC_STACKPROTECTOR