Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] x86: entry.S trap return fixes

do_debug() and do_int3() return void.

This patch fixes the CONFIG_KPROBES variant of do_int3() to return void too
and adjusts entry.S accordingly.

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Stas Sergeev and committed by
Linus Torvalds
48c88211 a2f7c354

+2 -7
-4
arch/i386/kernel/entry.S
··· 514 514 xorl %edx,%edx # error code 0 515 515 movl %esp,%eax # pt_regs pointer 516 516 call do_debug 517 - testl %eax,%eax 518 - jnz restore_all 519 517 jmp ret_from_exception 520 518 521 519 /* ··· 594 596 xorl %edx,%edx # zero error code 595 597 movl %esp,%eax # pt_regs pointer 596 598 call do_int3 597 - testl %eax,%eax 598 - jnz restore_all 599 599 jmp ret_from_exception 600 600 601 601 ENTRY(overflow)
+2 -3
arch/i386/kernel/traps.c
··· 643 643 } 644 644 645 645 #ifdef CONFIG_KPROBES 646 - fastcall int do_int3(struct pt_regs *regs, long error_code) 646 + fastcall void do_int3(struct pt_regs *regs, long error_code) 647 647 { 648 648 if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP) 649 649 == NOTIFY_STOP) 650 - return 1; 650 + return; 651 651 /* This is an interrupt gate, because kprobes wants interrupts 652 652 disabled. Normal trap handlers don't. */ 653 653 restore_interrupts(regs); 654 654 do_trap(3, SIGTRAP, "int3", 1, regs, error_code, NULL); 655 - return 0; 656 655 } 657 656 #endif 658 657