diff options
Diffstat (limited to 'kernel/panic.c')
-rw-r--r-- | kernel/panic.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/kernel/panic.c b/kernel/panic.c index 13d966b4c14a..8b821bce66e6 100644 --- a/kernel/panic.c +++ b/kernel/panic.c | |||
@@ -365,7 +365,8 @@ struct slowpath_args { | |||
365 | va_list args; | 365 | va_list args; |
366 | }; | 366 | }; |
367 | 367 | ||
368 | static void warn_slowpath_common(const char *file, int line, void *caller, struct slowpath_args *args) | 368 | static void warn_slowpath_common(const char *file, int line, void *caller, |
369 | unsigned taint, struct slowpath_args *args) | ||
369 | { | 370 | { |
370 | const char *board; | 371 | const char *board; |
371 | 372 | ||
@@ -381,7 +382,7 @@ static void warn_slowpath_common(const char *file, int line, void *caller, struc | |||
381 | print_modules(); | 382 | print_modules(); |
382 | dump_stack(); | 383 | dump_stack(); |
383 | print_oops_end_marker(); | 384 | print_oops_end_marker(); |
384 | add_taint(TAINT_WARN); | 385 | add_taint(taint); |
385 | } | 386 | } |
386 | 387 | ||
387 | void warn_slowpath_fmt(const char *file, int line, const char *fmt, ...) | 388 | void warn_slowpath_fmt(const char *file, int line, const char *fmt, ...) |
@@ -390,14 +391,29 @@ void warn_slowpath_fmt(const char *file, int line, const char *fmt, ...) | |||
390 | 391 | ||
391 | args.fmt = fmt; | 392 | args.fmt = fmt; |
392 | va_start(args.args, fmt); | 393 | va_start(args.args, fmt); |
393 | warn_slowpath_common(file, line, __builtin_return_address(0), &args); | 394 | warn_slowpath_common(file, line, __builtin_return_address(0), |
395 | TAINT_WARN, &args); | ||
394 | va_end(args.args); | 396 | va_end(args.args); |
395 | } | 397 | } |
396 | EXPORT_SYMBOL(warn_slowpath_fmt); | 398 | EXPORT_SYMBOL(warn_slowpath_fmt); |
397 | 399 | ||
400 | void warn_slowpath_fmt_taint(const char *file, int line, | ||
401 | unsigned taint, const char *fmt, ...) | ||
402 | { | ||
403 | struct slowpath_args args; | ||
404 | |||
405 | args.fmt = fmt; | ||
406 | va_start(args.args, fmt); | ||
407 | warn_slowpath_common(file, line, __builtin_return_address(0), | ||
408 | taint, &args); | ||
409 | va_end(args.args); | ||
410 | } | ||
411 | EXPORT_SYMBOL(warn_slowpath_fmt_taint); | ||
412 | |||
398 | void warn_slowpath_null(const char *file, int line) | 413 | void warn_slowpath_null(const char *file, int line) |
399 | { | 414 | { |
400 | warn_slowpath_common(file, line, __builtin_return_address(0), NULL); | 415 | warn_slowpath_common(file, line, __builtin_return_address(0), |
416 | TAINT_WARN, NULL); | ||
401 | } | 417 | } |
402 | EXPORT_SYMBOL(warn_slowpath_null); | 418 | EXPORT_SYMBOL(warn_slowpath_null); |
403 | #endif | 419 | #endif |