diff options
Diffstat (limited to 'arch/i386/kernel/traps.c')
-rw-r--r-- | arch/i386/kernel/traps.c | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index 313ac1f7dc5a..0d4005dc06c5 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c | |||
@@ -187,10 +187,21 @@ static void show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs, | |||
187 | if (unwind_init_blocked(&info, task) == 0) | 187 | if (unwind_init_blocked(&info, task) == 0) |
188 | unw_ret = show_trace_unwind(&info, log_lvl); | 188 | unw_ret = show_trace_unwind(&info, log_lvl); |
189 | } | 189 | } |
190 | if (unw_ret > 0) { | 190 | if (unw_ret > 0 && !arch_unw_user_mode(&info)) { |
191 | if (call_trace > 0) | 191 | #ifdef CONFIG_STACK_UNWIND |
192 | print_symbol("DWARF2 unwinder stuck at %s\n", | ||
193 | UNW_PC(&info)); | ||
194 | if (call_trace == 1) { | ||
195 | printk("Leftover inexact backtrace:\n"); | ||
196 | if (UNW_SP(&info)) | ||
197 | stack = (void *)UNW_SP(&info); | ||
198 | } else if (call_trace > 1) | ||
192 | return; | 199 | return; |
193 | printk("%sLegacy call trace:\n", log_lvl); | 200 | else |
201 | printk("Full inexact backtrace again:\n"); | ||
202 | #else | ||
203 | printk("Inexact backtrace:\n"); | ||
204 | #endif | ||
194 | } | 205 | } |
195 | } | 206 | } |
196 | 207 | ||
@@ -442,11 +453,9 @@ void die(const char * str, struct pt_regs * regs, long err) | |||
442 | if (in_interrupt()) | 453 | if (in_interrupt()) |
443 | panic("Fatal exception in interrupt"); | 454 | panic("Fatal exception in interrupt"); |
444 | 455 | ||
445 | if (panic_on_oops) { | 456 | if (panic_on_oops) |
446 | printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n"); | 457 | panic("Fatal exception: panic_on_oops"); |
447 | ssleep(5); | 458 | |
448 | panic("Fatal exception"); | ||
449 | } | ||
450 | oops_exit(); | 459 | oops_exit(); |
451 | do_exit(SIGSEGV); | 460 | do_exit(SIGSEGV); |
452 | } | 461 | } |
@@ -1238,8 +1247,10 @@ static int __init call_trace_setup(char *s) | |||
1238 | call_trace = -1; | 1247 | call_trace = -1; |
1239 | else if (strcmp(s, "both") == 0) | 1248 | else if (strcmp(s, "both") == 0) |
1240 | call_trace = 0; | 1249 | call_trace = 0; |
1241 | else if (strcmp(s, "new") == 0) | 1250 | else if (strcmp(s, "newfallback") == 0) |
1242 | call_trace = 1; | 1251 | call_trace = 1; |
1252 | else if (strcmp(s, "new") == 2) | ||
1253 | call_trace = 2; | ||
1243 | return 1; | 1254 | return 1; |
1244 | } | 1255 | } |
1245 | __setup("call_trace=", call_trace_setup); | 1256 | __setup("call_trace=", call_trace_setup); |