From 27f3c222480e06251a770ebaeab4801a93c20666 Mon Sep 17 00:00:00 2001 From: Oleg Nesterov Date: Fri, 8 Jul 2011 19:13:39 +0200 Subject: [PATCH] --- yaml --- r: 256864 b: refs/heads/master c: 6634ae1033ceaeca5877dd75723210f8c2648c17 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/ptrace.h | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 6d63aa964316..3e00408f3150 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 961c4675c75112717705fa5c0c53cb9664051479 +refs/heads/master: 6634ae1033ceaeca5877dd75723210f8c2648c17 diff --git a/trunk/include/linux/ptrace.h b/trunk/include/linux/ptrace.h index eae381d584f9..fd8669fc339f 100644 --- a/trunk/include/linux/ptrace.h +++ b/trunk/include/linux/ptrace.h @@ -217,16 +217,17 @@ static inline void ptrace_init_task(struct task_struct *child, bool ptrace) { INIT_LIST_HEAD(&child->ptrace_entry); INIT_LIST_HEAD(&child->ptraced); - child->parent = child->real_parent; +#ifdef CONFIG_HAVE_HW_BREAKPOINT + atomic_set(&child->ptrace_bp_refcnt, 1); +#endif + child->jobctl = 0; child->ptrace = 0; - if (unlikely(ptrace) && (current->ptrace & PT_PTRACED)) { + child->parent = child->real_parent; + + if (unlikely(ptrace) && current->ptrace) { child->ptrace = current->ptrace; __ptrace_link(child, current->parent); } - -#ifdef CONFIG_HAVE_HW_BREAKPOINT - atomic_set(&child->ptrace_bp_refcnt, 1); -#endif } /**