x86: handle_vm86_trap cleanup
authorRoland McGrath <roland@redhat.com>
Mon, 17 Mar 2008 09:21:08 +0000 (02:21 -0700)
committerIngo Molnar <mingo@elte.hu>
Thu, 17 Apr 2008 15:41:13 +0000 (17:41 +0200)
Use force_sig in handle_vm86_trap like other machine traps do.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/vm86_32.c

index 6a91fcf92d67a78c68e57359368ed1d4c9c7ff4a..51040698c22241fb8ec46853b584a73220394dd9 100644 (file)
@@ -557,16 +557,9 @@ int handle_vm86_trap(struct kernel_vm86_regs *regs, long error_code, int trapno)
        }
        if (trapno != 1)
                return 1; /* we let this handle by the calling routine */
-       if (current->ptrace & PT_PTRACED) {
-               unsigned long flags;
-               spin_lock_irqsave(&current->sighand->siglock, flags);
-               sigdelset(&current->blocked, SIGTRAP);
-               recalc_sigpending();
-               spin_unlock_irqrestore(&current->sighand->siglock, flags);
-       }
-       send_sig(SIGTRAP, current, 1);
        current->thread.trap_no = trapno;
        current->thread.error_code = error_code;
+       force_sig(SIGTRAP, current);
        return 0;
 }