lkml.org 
[lkml]   [2009]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC PATCH 5/X] ptrace: mv task_struct->ptrace ptrace_task->pt_flags, kill ptrace_link()
Date
>  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


\
 
 \ /
  Last update: 2009-05-26 23:25    [W:0.046 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site