* Oleg Nesterov <o...@redhat.com> [2009-10-26 04:28:46]:

> @@ -169,9 +164,9 @@ static inline void ptrace_init_task(stru
>       INIT_LIST_HEAD(&child->ptraced);
>       child->parent = child->real_parent;
>       child->ptrace = 0;
> -     if (unlikely(ptrace)) {
> +     if (unlikely(ptrace) && (current->ptrace & PT_PTRACED)) {

Any reason for directly accessing current->ptrace instead of accessing 
thro task_ptrace(current) ?

Also would something like this suffice.
 +      if (unlikely(ptrace) && (task_ptrace(current)) {

i.e the first patch in this series removes checks to see if ptrace field
is set with PT_TRACED. 
"task_ptrace() != 0 if and only if PT_PTRACED bit is set, kill
some PT_PTRACED checks in tracehook.h."


Can you please explain how this situation is different from the
situation in tracehook.h?

>               child->ptrace = current->ptrace;

--
Thanks and Regards
Srikar

Reply via email to