Re: [PATCH 1/2] fix kill_proc_info() vs CLONE_THREAD race
From: Oleg Nesterov
Date: Thu Feb 16 2006 - 14:56:40 EST
"Paul E. McKenney" wrote:
>
> > After that we don't need tasklist_lock to iterate over the thread
> > list, and we can simplify things, see for example do_sigaction()
> > or sys_times().
>
> The above proposal would require that we hold siglock during the
> traversal, correct?
Yes, of course.
> Is that reasonable for non-signal-related traversals?
> Or were you thinking of making this change only for signal code?
Yes, I think it may be useful for non-signal-related traversals.
Currently we need tasklist_lock in order to use next_thread().
I beleive, we can migrate to rcu_read_lock+spinlock(sighand)
in most cases.
Well, next_thread() itself is safe already, but it can return
already zapped threads.
Oleg.
-
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/