Re: [RFC PATCH 5/X] ptrace: mv task_struct->ptraceptrace_task->pt_flags, kill ptrace_link()

From: Roland McGrath
Date: Tue May 26 2009 - 17:22:50 EST


> static inline int task_ptrace(struct task_struct *task)
> {
> - return task->ptrace;
> + return unlikely(task->ptrace_task) ?
> + task->ptrace_task->pt_flags : 0;

This merits a short comment reminding the reader that once ->ptrace_task is
allocated, it is never freed until @task is freed, so this access is always
safe.


Thanks,
Roland
--
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/