[PATCH] Update comment on find_task_by_pid_ns

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Tetsuo Handa
Date: Monday, February 8, 2010 - 5:30 am

Thomas Gleixner wrote:

So, we need to update the comment on these functions?
----------------------------------------
[PATCH] Update comment on find_task_by_pid_ns

Caller of find_task_by_vpid() and find_task_by_pid_ns() needs to call
rcu_read_lock() rather than read_lock(&tasklist_lock) because find_pid_ns()
uses RCU primitives but spinlock does not prevent RCU callback if preemptive
RCU ( CONFIG_TREE_PREEMPT_RCU ) is enabled.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
---
 kernel/pid.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-next.orig/kernel/pid.c
+++ linux-next/kernel/pid.c
@@ -376,7 +376,7 @@ struct task_struct *pid_task(struct pid 
 EXPORT_SYMBOL(pid_task);
 
 /*
- * Must be called under rcu_read_lock() or with tasklist_lock read-held.
+ * Must be called under rcu_read_lock().
  */
 struct task_struct *find_task_by_pid_ns(pid_t nr, struct pid_namespace *ns)
 {
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[tip:core/urgent] sys: Fix missing rcu protection for __ta ..., tip-bot for Thomas G ..., (Thu Dec 10, 3:09 pm)
[PATCH] Update comment on find_task_by_pid_ns, Tetsuo Handa, (Mon Feb 8, 5:30 am)
Re: [PATCH] Update comment on find_task_by_pid_ns, Oleg Nesterov, (Mon Feb 8, 6:21 am)
Re: [PATCH] Update comment on find_task_by_pid_ns, Thomas Gleixner, (Mon Feb 8, 10:07 am)
Re: [PATCH] Update comment on find_task_by_pid_ns, Oleg Nesterov, (Mon Feb 8, 10:16 am)
Re: [PATCH] Update comment on find_task_by_pid_ns, Tetsuo Handa, (Mon Feb 8, 2:42 pm)
Re: [PATCH] Update comment on find_task_by_pid_ns, Andrew Morton, (Tue Feb 9, 3:08 pm)
Re: [PATCH] Update comment on find_task_by_pid_ns, Serge E. Hallyn, (Wed Feb 10, 9:30 am)
Re: [PATCH] Update comment on find_task_by_pid_ns, Andrew Morton, (Wed Feb 10, 10:57 am)
Re: [PATCH] Update comment on find_task_by_pid_ns, Thomas Gleixner, (Wed Feb 10, 11:39 am)
Re: [PATCH] Update comment on find_task_by_pid_ns, Serge E. Hallyn, (Wed Feb 10, 1:18 pm)
Re: [PATCH] Update comment on find_task_by_pid_ns, Paul E. McKenney, (Wed Feb 10, 1:30 pm)
Re: [PATCH] Update comment on find_task_by_pid_ns, Tetsuo Handa, (Wed Feb 10, 6:21 pm)