diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86_64/kernel/traps.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index 0266b523e8d0..bd71ddac0dc5 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c | |||
@@ -489,7 +489,23 @@ DO_ERROR(11, SIGBUS, "segment not present", segment_not_present) | |||
489 | DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, BUS_ADRALN, 0) | 489 | DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, BUS_ADRALN, 0) |
490 | DO_ERROR(18, SIGSEGV, "reserved", reserved) | 490 | DO_ERROR(18, SIGSEGV, "reserved", reserved) |
491 | DO_ERROR(12, SIGBUS, "stack segment", stack_segment) | 491 | DO_ERROR(12, SIGBUS, "stack segment", stack_segment) |
492 | DO_ERROR( 8, SIGSEGV, "double fault", double_fault) | 492 | |
493 | asmlinkage void do_double_fault(struct pt_regs * regs, long error_code) | ||
494 | { | ||
495 | static const char str[] = "double fault"; | ||
496 | struct task_struct *tsk = current; | ||
497 | |||
498 | /* Return not checked because double check cannot be ignored */ | ||
499 | notify_die(DIE_TRAP, str, regs, error_code, 8, SIGSEGV); | ||
500 | |||
501 | tsk->thread.error_code = error_code; | ||
502 | tsk->thread.trap_no = 8; | ||
503 | |||
504 | /* This is always a kernel trap and never fixable (and thus must | ||
505 | never return). */ | ||
506 | for (;;) | ||
507 | die(str, regs, error_code); | ||
508 | } | ||
493 | 509 | ||
494 | asmlinkage void __kprobes do_general_protection(struct pt_regs * regs, | 510 | asmlinkage void __kprobes do_general_protection(struct pt_regs * regs, |
495 | long error_code) | 511 | long error_code) |