lkml.org 
[lkml]   [2006]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 21/22] fix non-leader exec under ptrace
    -stable review patch.  If anyone has any objections, please let us know.

    ------------------

    This reverts most of commit 30e0fca6c1d7d26f3f2daa4dd2b12c51dadc778a.
    It broke the case of non-leader MT exec when ptraced.
    I think the bug it was intended to fix was already addressed by commit
    788e05a67c343fa22f2ae1d3ca264e7f15c25eaf.

    Signed-off-by: Roland McGrath <roland@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    kernel/ptrace.c | 7 ++-----
    kernel/signal.c | 4 ++--
    2 files changed, 4 insertions(+), 7 deletions(-)

    --- linux-2.6.16.5.orig/kernel/ptrace.c
    +++ linux-2.6.16.5/kernel/ptrace.c
    @@ -57,10 +57,6 @@ void ptrace_untrace(task_t *child)
    signal_wake_up(child, 1);
    }
    }
    - if (child->signal->flags & SIGNAL_GROUP_EXIT) {
    - sigaddset(&child->pending.signal, SIGKILL);
    - signal_wake_up(child, 1);
    - }
    spin_unlock(&child->sighand->siglock);
    }

    @@ -82,7 +78,8 @@ void __ptrace_unlink(task_t *child)
    SET_LINKS(child);
    }

    - ptrace_untrace(child);
    + if (child->state == TASK_TRACED)
    + ptrace_untrace(child);
    }

    /*
    --- linux-2.6.16.5.orig/kernel/signal.c
    +++ linux-2.6.16.5/kernel/signal.c
    @@ -1942,9 +1942,9 @@ relock:
    /* Let the debugger run. */
    ptrace_stop(signr, signr, info);

    - /* We're back. Did the debugger cancel the sig or group_exit? */
    + /* We're back. Did the debugger cancel the sig? */
    signr = current->exit_code;
    - if (signr == 0 || current->signal->flags & SIGNAL_GROUP_EXIT)
    + if (signr == 0)
    continue;

    current->exit_code = 0;
    --
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-04-14 01:18    [W:0.020 / U:0.608 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site