From 201ac55f113d7ee1379782b0e9ee1097610bf690 Mon Sep 17 00:00:00 2001 From: Oleg Nesterov Date: Fri, 18 Dec 2009 02:11:28 +0100 Subject: [PATCH] ptrace_signal: check PT_PTRACED before reporting a signal No functional changes, preparation for utrace-ptrace. Change ptrace_signal() to check PT_PTRACED instead of task_ptrace() != 0. Currently this is the same, PT_PTRACED must be always set if the task is ptraced. This change is needed to make sure ptrace_signal() does nothing if ptrace is implemented on top of utrace, eventually this code will be removed completely. Signed-off-by: Roland McGrath Signed-off-by: Oleg Nesterov --- kernel/signal.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kernel/signal.c b/kernel/signal.c index 934ae5e..1a43cc9 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -1768,7 +1768,7 @@ static int do_signal_stop(int signr) static int ptrace_signal(int signr, siginfo_t *info, struct pt_regs *regs, void *cookie) { - if (!task_ptrace(current)) + if (!(task_ptrace(current) & PT_PTRACED)) return signr; ptrace_signal_deliver(regs, cookie); -- 1.7.4