* [PATCH] tasklist-RCU fix in attach_pid()
@ 2005-11-09 3:22 Paul E. McKenney
2005-11-09 8:14 ` William Lee Irwin III
2005-11-09 14:35 ` Ingo Molnar
0 siblings, 2 replies; 3+ messages in thread
From: Paul E. McKenney @ 2005-11-09 3:22 UTC (permalink / raw)
To: akpm, mingo; +Cc: linux-kernel, dipankar, wli
Hello!
Bug in attach_pid() can result in RCU readers in find_pid() getting
confused if they race with process creation.
Signed-off-by: <paulmck@us.ibm.com>
---
(applies to both 2.6.14-mm1 and -rt)
pid.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff -uprNa -X dontdiff linux-2.6.14-mm1/kernel/pid.c linux-2.6.14-mm1-fix-1/kernel/pid.c
--- linux-2.6.14-mm1/kernel/pid.c 2005-11-08 08:18:55.000000000 -0800
+++ linux-2.6.14-mm1-fix-1/kernel/pid.c 2005-11-08 19:02:35.000000000 -0800
@@ -150,6 +150,7 @@ int fastcall attach_pid(task_t *task, en
task_pid = &task->pids[type];
pid = find_pid(type, nr);
+ task_pid->nr = nr;
if (pid == NULL) {
INIT_LIST_HEAD(&task_pid->pid_list);
hlist_add_head_rcu(&task_pid->pid_chain,
@@ -158,7 +159,6 @@ int fastcall attach_pid(task_t *task, en
INIT_HLIST_NODE(&task_pid->pid_chain);
list_add_tail_rcu(&task_pid->pid_list, &pid->pid_list);
}
- task_pid->nr = nr;
return 0;
}
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] tasklist-RCU fix in attach_pid()
2005-11-09 3:22 [PATCH] tasklist-RCU fix in attach_pid() Paul E. McKenney
@ 2005-11-09 8:14 ` William Lee Irwin III
2005-11-09 14:35 ` Ingo Molnar
1 sibling, 0 replies; 3+ messages in thread
From: William Lee Irwin III @ 2005-11-09 8:14 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: akpm, mingo, linux-kernel, dipankar
On Tue, Nov 08, 2005 at 07:22:34PM -0800, Paul E. McKenney wrote:
> Bug in attach_pid() can result in RCU readers in find_pid() getting
> confused if they race with process creation.
> Signed-off-by: <paulmck@us.ibm.com>
Simple enough.
Acked-by: William Irwin <wli@holomorphy.com>
-- wli
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tasklist-RCU fix in attach_pid()
2005-11-09 3:22 [PATCH] tasklist-RCU fix in attach_pid() Paul E. McKenney
2005-11-09 8:14 ` William Lee Irwin III
@ 2005-11-09 14:35 ` Ingo Molnar
1 sibling, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2005-11-09 14:35 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: akpm, linux-kernel, dipankar, wli
* Paul E. McKenney <paulmck@us.ibm.com> wrote:
> Hello!
>
> Bug in attach_pid() can result in RCU readers in find_pid() getting
> confused if they race with process creation.
>
> Signed-off-by: <paulmck@us.ibm.com>
yeah ...
Acked-by: Ingo Molnar <mingo@elte.hu>
Ingo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-11-09 14:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-09 3:22 [PATCH] tasklist-RCU fix in attach_pid() Paul E. McKenney
2005-11-09 8:14 ` William Lee Irwin III
2005-11-09 14:35 ` Ingo Molnar
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.