diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S index 3c73dc865ead3ad2323098a3b78b0fc8042e7489..fe1918cc68d1f343e7857dd86b66488f4ff1938c 100644 --- a/arch/i386/kernel/entry.S +++ b/arch/i386/kernel/entry.S @@ -260,11 +260,9 @@ restore_nocheck: .section .fixup,"ax" iret_exc: sti - movl $__USER_DS, %edx - movl %edx, %ds - movl %edx, %es - movl $11,%eax - call do_exit + pushl $0 # no error code + pushl $do_iret_error + jmp error_code .previous .section __ex_table,"a" .align 4 diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index 6c0e383915b6a0d9fc516a04f328020d18b575b5..d70819481f6eb1af7de9b4bc5c05e7d78b0a43af 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c @@ -451,6 +451,7 @@ DO_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS) DO_ERROR(11, SIGBUS, "segment not present", segment_not_present) DO_ERROR(12, SIGBUS, "stack segment", stack_segment) DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, BUS_ADRALN, 0) +DO_ERROR_INFO(32, SIGSEGV, "iret exception", iret_error, ILL_BADSTK, 0) fastcall void do_general_protection(struct pt_regs * regs, long error_code) {