summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-08-08 03:14:24 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2008-08-08 03:14:24 +0200
commitaeee90dfa01844168cd7f8051d0a0f969c573067 (patch)
treef7a62a16a1484321ce5b4306d5e5f7fa8819243c /include
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rol... (diff)
parenttracehook: fix CLONE_PTRACE (diff)
downloadlinux-aeee90dfa01844168cd7f8051d0a0f969c573067.tar.xz
linux-aeee90dfa01844168cd7f8051d0a0f969c573067.zip
Merge branch 'tracehook' of git://git.kernel.org/pub/scm/linux/kernel/git/frob/linux-2.6-utrace
* 'tracehook' of git://git.kernel.org/pub/scm/linux/kernel/git/frob/linux-2.6-utrace: tracehook: fix CLONE_PTRACE
Diffstat (limited to 'include')
-rw-r--r--include/linux/ptrace.h2
-rw-r--r--include/linux/tracehook.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
index fd31756e1a00..ea7416c901d1 100644
--- a/include/linux/ptrace.h
+++ b/include/linux/ptrace.h
@@ -172,7 +172,7 @@ static inline void ptrace_init_task(struct task_struct *child, bool ptrace)
child->ptrace = 0;
if (unlikely(ptrace)) {
child->ptrace = current->ptrace;
- __ptrace_link(child, current->parent);
+ ptrace_link(child, current->parent);
}
}
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
index ab3ef7aefa95..b48d81969574 100644
--- a/include/linux/tracehook.h
+++ b/include/linux/tracehook.h
@@ -280,7 +280,7 @@ static inline void tracehook_report_clone(int trace, struct pt_regs *regs,
unsigned long clone_flags,
pid_t pid, struct task_struct *child)
{
- if (unlikely(trace)) {
+ if (unlikely(trace) || unlikely(clone_flags & CLONE_PTRACE)) {
/*
* The child starts up with an immediate SIGSTOP.
*/