[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090506071400.GB3223@infradead.org>
Date: Wed, 6 May 2009 03:14:01 -0400
From: Christoph Hellwig <hch@...radead.org>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Roland McGrath <roland@...hat.com>,
linux-kernel@...r.kernel.org
Subject: Re: [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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists