Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 123192
b: refs/heads/master
c: 74853db
h: refs/heads/master
v: v3
  • Loading branch information
Arjan van de Ven authored and Ingo Molnar committed Nov 28, 2008
1 parent 822cec1 commit e3c0047
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7fbb8759eff9a348efa5f352ffaa51c364837c4b
refs/heads/master: 74853dba2f7a1a9b0905a09abcf65c1f3ce0b14f
32 changes: 12 additions & 20 deletions trunk/kernel/panic.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,23 +320,6 @@ void oops_exit(void)
}

#ifdef WANT_WARN_ON_SLOWPATH
void warn_on_slowpath(const char *file, int line)
{
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);
print_modules();
dump_stack();
print_oops_end_marker();
add_taint(TAINT_WARN);
}
EXPORT_SYMBOL(warn_on_slowpath);


void warn_slowpath(const char *file, int line, const char *fmt, ...)
{
va_list args;
Expand All @@ -347,16 +330,25 @@ void warn_slowpath(const char *file, int line, const char *fmt, ...)
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);

if (fmt) {
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);

void warn_on_slowpath(const char *file, int line)
{
warn_slowpath(file, line, NULL);
}
EXPORT_SYMBOL(warn_on_slowpath);
#endif

#ifdef CONFIG_CC_STACKPROTECTOR
Expand Down

0 comments on commit e3c0047

Please sign in to comment.