aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2011-03-23 05:37:00 -0400
committerTejun Heo <tj@kernel.org>2011-03-23 05:37:00 -0400
commitfe1bc6a0954611b806f9e158eb0817cf8ba21660 (patch)
tree356b804f797a53b95976f1c4b75a4671277208c1 /kernel
parentedf2ed153bcae52de70db00a98b0e81a5668e563 (diff)
ptrace: Add @why to ptrace_stop()
To prepare for cleanup of the interaction between group stop and ptrace, add @why to ptrace_stop(). Existing users are updated such that there is no behavior change. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Roland McGrath <roland@redhat.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/signal.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index 03d874e1058f..95ac42dc3bcb 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1617,7 +1617,7 @@ static int sigkill_pending(struct task_struct *tsk)
1617 * If we actually decide not to stop at all because the tracer 1617 * If we actually decide not to stop at all because the tracer
1618 * is gone, we keep current->exit_code unless clear_code. 1618 * is gone, we keep current->exit_code unless clear_code.
1619 */ 1619 */
1620static void ptrace_stop(int exit_code, int clear_code, siginfo_t *info) 1620static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info)
1621 __releases(&current->sighand->siglock) 1621 __releases(&current->sighand->siglock)
1622 __acquires(&current->sighand->siglock) 1622 __acquires(&current->sighand->siglock)
1623{ 1623{
@@ -1655,7 +1655,7 @@ static void ptrace_stop(int exit_code, int clear_code, siginfo_t *info)
1655 spin_unlock_irq(&current->sighand->siglock); 1655 spin_unlock_irq(&current->sighand->siglock);
1656 read_lock(&tasklist_lock); 1656 read_lock(&tasklist_lock);
1657 if (may_ptrace_stop()) { 1657 if (may_ptrace_stop()) {
1658 do_notify_parent_cldstop(current, CLD_TRAPPED); 1658 do_notify_parent_cldstop(current, why);
1659 /* 1659 /*
1660 * Don't want to allow preemption here, because 1660 * Don't want to allow preemption here, because
1661 * sys_ptrace() needs this task to be inactive. 1661 * sys_ptrace() needs this task to be inactive.
@@ -1714,7 +1714,7 @@ void ptrace_notify(int exit_code)
1714 1714
1715 /* Let the debugger run. */ 1715 /* Let the debugger run. */
1716 spin_lock_irq(&current->sighand->siglock); 1716 spin_lock_irq(&current->sighand->siglock);
1717 ptrace_stop(exit_code, 1, &info); 1717 ptrace_stop(exit_code, CLD_TRAPPED, 1, &info);
1718 spin_unlock_irq(&current->sighand->siglock); 1718 spin_unlock_irq(&current->sighand->siglock);
1719} 1719}
1720 1720
@@ -1795,7 +1795,7 @@ static int ptrace_signal(int signr, siginfo_t *info,
1795 ptrace_signal_deliver(regs, cookie); 1795 ptrace_signal_deliver(regs, cookie);
1796 1796
1797 /* Let the debugger run. */ 1797 /* Let the debugger run. */
1798 ptrace_stop(signr, 0, info); 1798 ptrace_stop(signr, CLD_TRAPPED, 0, info);
1799 1799
1800 /* We're back. Did the debugger cancel the sig? */ 1800 /* We're back. Did the debugger cancel the sig? */
1801 signr = current->exit_code; 1801 signr = current->exit_code;