lkml.org 
[lkml]   [2006]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH rc1-mm] de_thread: fix deadlockable process addition
On 04/06, Eric W. Biederman wrote:
>
> Ack. The evils of de_thread!

Yes, just noticed another thing,

[PATCH] task-make-task-list-manipulations-rcu-safe-fix-fix

We shoudn't decrement process_counts if de_thread() unhashed the task.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>

--- MM/kernel/exit.c~ 2006-04-06 23:01:37.000000000 +0400
+++ MM/kernel/exit.c 2006-04-08 03:35:24.000000000 +0400
@@ -56,9 +56,10 @@ static void __unhash_process(struct task
detach_pid(p, PIDTYPE_SID);

/* see de_thread()->list_replace_rcu() */
- if (likely(p->tasks.prev != LIST_POISON2))
+ if (likely(p->tasks.prev != LIST_POISON2)) {
list_del_rcu(&p->tasks);
- __get_cpu_var(process_counts)--;
+ __get_cpu_var(process_counts)--;
+ }
}
list_del_rcu(&p->thread_group);
remove_parent(p);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-07 21:52    [W:0.050 / U:2.524 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site