From: Andrew Morton Signed-off-by: Andrew Morton --- arch/i386/Kconfig.kgdb | 8 -------- arch/i386/kernel/entry.S | 4 ---- arch/i386/kernel/kgdb_stub.c | 16 ---------------- 3 files changed, 28 deletions(-) diff -puN arch/i386/Kconfig.kgdb~kgdb-remove-TRAP_BAD_SYSCALL_EXITS arch/i386/Kconfig.kgdb --- devel/arch/i386/Kconfig.kgdb~kgdb-remove-TRAP_BAD_SYSCALL_EXITS 2006-02-27 02:43:46.000000000 -0800 +++ devel-akpm/arch/i386/Kconfig.kgdb 2006-02-27 02:43:46.000000000 -0800 @@ -64,14 +64,6 @@ config KGDB_IRQ correctly and the kernel has interrupts on a control C to the port should cause a break into the kernel debug stub. -config TRAP_BAD_SYSCALL_EXITS - bool "Debug bad system call exits" - depends on KGDB - help - If you say Y here the kernel will check for system calls which - return without clearing preempt. - default n - config KGDB_CONSOLE bool "Enable serial console thru kgdb port" depends on KGDB diff -puN arch/i386/kernel/entry.S~kgdb-remove-TRAP_BAD_SYSCALL_EXITS arch/i386/kernel/entry.S --- devel/arch/i386/kernel/entry.S~kgdb-remove-TRAP_BAD_SYSCALL_EXITS 2006-02-27 02:43:46.000000000 -0800 +++ devel-akpm/arch/i386/kernel/entry.S 2006-02-27 02:43:46.000000000 -0800 @@ -247,10 +247,6 @@ syscall_exit: cli # make sure we don't miss an interrupt # setting need_resched or sigpending # between sampling and the iret -#ifdef CONFIG_TRAP_BAD_SYSCALL_EXITS - movl %esp, %eax # pt_regs pointer - call sys_call_exit -#endif movl TI_flags(%ebp), %ecx testw $_TIF_ALLWORK_MASK, %cx # current->work jne syscall_exit_work diff -puN arch/i386/kernel/kgdb_stub.c~kgdb-remove-TRAP_BAD_SYSCALL_EXITS arch/i386/kernel/kgdb_stub.c --- devel/arch/i386/kernel/kgdb_stub.c~kgdb-remove-TRAP_BAD_SYSCALL_EXITS 2006-02-27 02:43:46.000000000 -0800 +++ devel-akpm/arch/i386/kernel/kgdb_stub.c 2006-02-27 02:43:46.000000000 -0800 @@ -1817,22 +1817,6 @@ exit_kgdb: return (0); } -/* - * This function will generate a breakpoint exception. It is used at the - * beginning of a program to sync up with a debugger and can be used - * otherwise as a quick means to stop program execution and "break" into - * the debugger. But really, just use the BREAKPOINT macro. We will handle the - * int stuff - */ -#ifdef CONFIG_TRAP_BAD_SYSCALL_EXITS -fastcall void sys_call_exit(struct pt_regs *regs) -{ - if (preempt_count()) - printk("Sys call %d return with %x preempt_count\n", - (int) regs->orig_eax, preempt_count()); -} -#endif - #ifdef CONFIG_KGDB_CONSOLE #include #include _