Re: [RFC PATCH 7/X] ptrace: mv task->parent ptrace_task->pt_tracer

From: Oleg Nesterov
Date: Mon May 25 2009 - 18:03:51 EST


On 05/25, Oleg Nesterov wrote:
>
> Move task_struct->parent into ptrace_task->pt_tracer and change the users
> accordingly.
>
> ...
>
> @@ -1773,8 +1779,8 @@ static int ptrace_signal(int signr, sigi
> info->si_signo = signr;
> info->si_errno = 0;
> info->si_code = SI_USER;
> - info->si_pid = task_pid_vnr(current->parent);
> - info->si_uid = task_uid(current->parent);
> + info->si_pid = task_pid_vnr(current->ptrace_task->pt_tracer);
> + info->si_uid = task_uid(current->ptrace_task->pt_tracer);

This change is wrong, will re-do. The task can be already untraced
after ptrace_stop().

But is the current code correct? If we are not traced any longer
si_pid/si_uid are not necessary right either, we should calculate them
before ptrace_stop(), no?

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/