diff options
Diffstat (limited to 'kernel/panic.c')
-rw-r--r-- | kernel/panic.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/kernel/panic.c b/kernel/panic.c index 0ebea438278a..d9e90cfe3298 100644 --- a/kernel/panic.c +++ b/kernel/panic.c | |||
@@ -281,6 +281,13 @@ static int init_oops_id(void) | |||
281 | } | 281 | } |
282 | late_initcall(init_oops_id); | 282 | late_initcall(init_oops_id); |
283 | 283 | ||
284 | static void print_oops_end_marker(void) | ||
285 | { | ||
286 | init_oops_id(); | ||
287 | printk(KERN_WARNING "---[ end trace %016llx ]---\n", | ||
288 | (unsigned long long)oops_id); | ||
289 | } | ||
290 | |||
284 | /* | 291 | /* |
285 | * Called when the architecture exits its oops handler, after printing | 292 | * Called when the architecture exits its oops handler, after printing |
286 | * everything. | 293 | * everything. |
@@ -288,9 +295,7 @@ late_initcall(init_oops_id); | |||
288 | void oops_exit(void) | 295 | void oops_exit(void) |
289 | { | 296 | { |
290 | do_oops_enter_exit(); | 297 | do_oops_enter_exit(); |
291 | init_oops_id(); | 298 | print_oops_end_marker(); |
292 | printk(KERN_WARNING "---[ end trace %016llx ]---\n", | ||
293 | (unsigned long long)oops_id); | ||
294 | } | 299 | } |
295 | 300 | ||
296 | #ifdef WANT_WARN_ON_SLOWPATH | 301 | #ifdef WANT_WARN_ON_SLOWPATH |
@@ -298,11 +303,14 @@ void warn_on_slowpath(const char *file, int line) | |||
298 | { | 303 | { |
299 | char function[KSYM_SYMBOL_LEN]; | 304 | char function[KSYM_SYMBOL_LEN]; |
300 | unsigned long caller = (unsigned long) __builtin_return_address(0); | 305 | unsigned long caller = (unsigned long) __builtin_return_address(0); |
301 | |||
302 | sprint_symbol(function, caller); | 306 | sprint_symbol(function, caller); |
307 | |||
308 | printk(KERN_WARNING "------------[ cut here ]------------\n"); | ||
303 | printk(KERN_WARNING "WARNING: at %s:%d %s()\n", file, | 309 | printk(KERN_WARNING "WARNING: at %s:%d %s()\n", file, |
304 | line, function); | 310 | line, function); |
311 | print_modules(); | ||
305 | dump_stack(); | 312 | dump_stack(); |
313 | print_oops_end_marker(); | ||
306 | } | 314 | } |
307 | EXPORT_SYMBOL(warn_on_slowpath); | 315 | EXPORT_SYMBOL(warn_on_slowpath); |
308 | #endif | 316 | #endif |