Re: [PATCH] ptrace_get_task_struct: s/tasklist/rcu/, make it static

From: Christoph Hellwig
Date: Wed May 06 2009 - 03:14:45 EST


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.

--
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/