From 657ae5e03224e220fd4017afb9ebd9a553c70eba Mon Sep 17 00:00:00 2001 From: Oleg Nesterov Date: Fri, 18 Dec 2009 02:11:32 +0100 Subject: [PATCH] export __ptrace_detach() and do_notify_parent_cldstop() Export __ptrace_detach() and do_notify_parent_cldstop() for ptrace-utrace. Signed-off-by: Roland McGrath Signed-off-by: Oleg Nesterov --- include/linux/ptrace.h | 1 + include/linux/sched.h | 1 + kernel/ptrace.c | 2 +- kernel/signal.c | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index 56f2d63..4802e2a 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h @@ -85,6 +85,7 @@ extern int ptrace_traceme(void); extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len); extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); extern int ptrace_attach(struct task_struct *tsk); +extern bool __ptrace_detach(struct task_struct *tracer, struct task_struct *tracee); extern int ptrace_detach(struct task_struct *, unsigned int); extern void ptrace_disable(struct task_struct *); extern int ptrace_check_attach(struct task_struct *task, int kill); diff --git a/include/linux/sched.h b/include/linux/sched.h index 6f7bba9..e5660e0 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2091,6 +2091,7 @@ extern int kill_pgrp(struct pid *pid, int sig, int priv); extern int kill_pid(struct pid *pid, int sig, int priv); extern int kill_proc_info(int, struct siginfo *, pid_t); extern int do_notify_parent(struct task_struct *, int); +extern void do_notify_parent_cldstop(struct task_struct *, int); extern void __wake_up_parent(struct task_struct *p, struct task_struct *parent); extern void force_sig(int, struct task_struct *); extern int send_sig(int, struct task_struct *, int); diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 23bd09c..b7c1d32 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c @@ -271,7 +271,7 @@ static int ignoring_children(struct sighand_struct *sigh) * reap it now, in that case we must also wake up sub-threads sleeping in * do_wait(). */ -static bool __ptrace_detach(struct task_struct *tracer, struct task_struct *p) +bool __ptrace_detach(struct task_struct *tracer, struct task_struct *p) { __ptrace_unlink(p); diff --git a/kernel/signal.c b/kernel/signal.c index 1a43cc9..9551cec 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -1498,7 +1498,7 @@ int do_notify_parent(struct task_struct *tsk, int sig) return ret; } -static void do_notify_parent_cldstop(struct task_struct *tsk, int why) +void do_notify_parent_cldstop(struct task_struct *tsk, int why) { struct siginfo info; unsigned long flags; -- 1.7.4