Messages in this thread | | | Date | Fri, 30 Nov 2012 17:03:53 +0530 | Subject | panic doesn't get invoked on oops when panic_on_oops is set | From | Kalash Nainwal <> |
| |
Hi,
An oops doesn't result in panic() call even when panic_on_oops is set (if we've a crash kernel loaded). The reason seems to be that from oops codepath before calling panic(), we call crash_kexec() if panic_on_oops is set:
void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr)
{ if (regs && kexec_should_crash(current)) crash_kexec(regs); <====== I'm hitting this . . if (panic_on_oops) panic("Fatal exception"); <==== I want this to be hit do_exit(signr); }
int kexec_should_crash(struct task_struct *p) { if (in_interrupt() || !p->pid || is_global_init(p) || panic_on_oops) return 1; return 0; }
If we let panic() get called from oops_end(), we would eventually call crash_kexec() from panic() anyway. Isn't it?
Then is the panic_on_oops check in kexec_should_crash() redundant? Or there's reason behind this behavior?
Would greatly appreciate any response here. Also please CC me as I am not part of linux-kernel list.
Regards, -Kalash
| |