提交 380851bc 编写于 作者: A Andi Kleen 提交者: H. Peter Anvin

x86, mce: use force_sig_info to kill process in machine check

Impact: bug fix (with tolerant == 3)

do_exit cannot be called directly from the exception handler because
it can sleep and the exception handler runs on the exception stack.
Use force_sig() instead.

Based on a earlier patch by Ying Huang who debugged the problem.
Signed-off-by: NAndi Kleen <ak@linux.intel.com>
Acked-by: NThomas Gleixner <tglx@linutronix.de>
Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
上级 6ec68bff
...@@ -295,11 +295,11 @@ void do_machine_check(struct pt_regs * regs, long error_code) ...@@ -295,11 +295,11 @@ void do_machine_check(struct pt_regs * regs, long error_code)
* If we know that the error was in user space, send a * If we know that the error was in user space, send a
* SIGBUS. Otherwise, panic if tolerance is low. * SIGBUS. Otherwise, panic if tolerance is low.
* *
* do_exit() takes an awful lot of locks and has a slight * force_sig() takes an awful lot of locks and has a slight
* risk of deadlocking. * risk of deadlocking.
*/ */
if (user_space) { if (user_space) {
do_exit(SIGBUS); force_sig(SIGBUS, current);
} else if (panic_on_oops || tolerant < 2) { } else if (panic_on_oops || tolerant < 2) {
mce_panic("Uncorrected machine check", mce_panic("Uncorrected machine check",
&panicm, mcestart); &panicm, mcestart);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册