Skip to content

Commit

Permalink
[PATCH] x86: entry.S trap return fixes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stas Sergeev authored and Linus Torvalds committed May 1, 2005
1 parent a2f7c35 commit 48c8821
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 0 additions & 4 deletions arch/i386/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,6 @@ debug_stack_correct:
xorl %edx,%edx # error code 0
movl %esp,%eax # pt_regs pointer
call do_debug
testl %eax,%eax
jnz restore_all
jmp ret_from_exception

/*
Expand Down Expand Up @@ -596,8 +594,6 @@ ENTRY(int3)
xorl %edx,%edx # zero error code
movl %esp,%eax # pt_regs pointer
call do_int3
testl %eax,%eax
jnz restore_all
jmp ret_from_exception

ENTRY(overflow)
Expand Down
5 changes: 2 additions & 3 deletions arch/i386/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -643,16 +643,15 @@ void unset_nmi_callback(void)
}

#ifdef CONFIG_KPROBES
fastcall int do_int3(struct pt_regs *regs, long error_code)
fastcall void do_int3(struct pt_regs *regs, long error_code)
{
if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP)
== NOTIFY_STOP)
return 1;
return;
/* This is an interrupt gate, because kprobes wants interrupts
disabled. Normal trap handlers don't. */
restore_interrupts(regs);
do_trap(3, SIGTRAP, "int3", 1, regs, error_code, NULL);
return 0;
}
#endif

Expand Down

0 comments on commit 48c8821

Please sign in to comment.