This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / arch / i386 / kernel / signal.c
index ab606b5..6d0411a 100644 (file)
@@ -190,12 +190,6 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *peax
                        if (verify_area(VERIFY_READ, buf, sizeof(*buf)))
                                goto badframe;
                        err |= restore_i387(buf);
-               } else {
-                       struct task_struct *me = current;
-                       if (me->used_math) {
-                               clear_fpu(me);
-                               me->used_math = 0;
-                       }
                }
        }
 
@@ -298,15 +292,10 @@ setup_sigcontext(struct sigcontext __user *sc, struct _fpstate __user *fpstate,
        err |= __put_user(current->thread.error_code, &sc->err);
        err |= __put_user(regs->eip, &sc->eip);
        err |= __put_user(regs->xcs, (unsigned int __user *)&sc->cs);
-
-       /*
-        * Iff TF was set because the program is being single-stepped by a
-        * debugger, don't save that information on the signal stack.. We
-        * don't want debugging to change state.
-        */
        eflags = regs->eflags;
-       if (current->ptrace & PT_DTRACE)
+       if (current->ptrace & PT_PTRACED) {
                eflags &= ~TF_MASK;
+       }
        err |= __put_user(eflags, &sc->eflags);
        err |= __put_user(regs->esp, &sc->esp_at_signal);
        err |= __put_user(regs->xss, (unsigned int __user *)&sc->ss);
@@ -423,17 +412,12 @@ static void setup_frame(int sig, struct k_sigaction *ka,
        regs->xes = __USER_DS;
        regs->xss = __USER_DS;
        regs->xcs = __USER_CS;
-
-       /*
-        * Clear TF when entering the signal handler, but
-        * notify any tracer that was single-stepping it.
-        * The tracer may want to single-step inside the
-        * handler too.
-        */
        if (regs->eflags & TF_MASK) {
-               regs->eflags &= ~TF_MASK;
-               if (current->ptrace & PT_DTRACE)
+               if (current->ptrace & PT_PTRACED) {
                        ptrace_notify(SIGTRAP);
+               } else {
+                       regs->eflags &= ~TF_MASK;
+               }
        }
 
 #if DEBUG_SIG
@@ -519,17 +503,12 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
        regs->xes = __USER_DS;
        regs->xss = __USER_DS;
        regs->xcs = __USER_CS;
-
-       /*
-        * Clear TF when entering the signal handler, but
-        * notify any tracer that was single-stepping it.
-        * The tracer may want to single-step inside the
-        * handler too.
-        */
        if (regs->eflags & TF_MASK) {
-               regs->eflags &= ~TF_MASK;
-               if (current->ptrace & PT_DTRACE)
+               if (current->ptrace & PT_PTRACED) {
                        ptrace_notify(SIGTRAP);
+               } else {
+                       regs->eflags &= ~TF_MASK;
+               }
        }
 
 #if DEBUG_SIG