lkml.org 
[lkml]   [2009]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ptrace_get_task_struct: s/tasklist/rcu/, make it static
On Wed, May 06, 2009 at 01:28:20AM +0200, Oleg Nesterov wrote:
> - Use rcu_read_lock() instead of tasklist_lock to find/get the task
> in ptrace_get_task_struct().
>
> - Make it static, it has no callers outside of ptrace.c.

FYI, there are a couple of other functions in ptrace.c that can be
static now that everyone uses the common sys_ptrace implementation,
e.g. ptrace_traceme and ptrace_attach.

> - The comment doesn't match the reality, this helper does not do
> any checks. Beacuse it is really trivial and static I removed the
> whole comment.

Yeah, when I added the helper it did those checks and it was non-static
for the various arch ptrace implementations. Now that it's a private
helper with just two callers not doing much anymore it's not needed.



\
 
 \ /
  Last update: 2009-05-06 09:17    [W:0.046 / U:7.952 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site