Re: [PATCH 2.6.27-rc5] Fix itimer/many thread hang.
From: Oleg Nesterov
Date: Wed Sep 10 2008 - 12:26:56 EST
On 09/09, Frank Mayhar wrote:
>
> On Tue, 2008-09-09 at 20:01 +0400, Oleg Nesterov wrote:
> > The patch has a lot of
> >
> > rcu_read_lock();
> > sig = rcu_dereference(tsk->signal);
> >
> > This is bogus, task_struct->signal is not protected by RCU.
>
> I just want to snapshot the field
> atomically. I guess I can just do an atomic read...
Missed this part...
No, no, you don't need an atomic read. Just do
sig = tsk->signal;
if (sig)
use(sig);
->signal must be stable, or the code is buggy anyway. (and the task
never changes its ->signal, it becomes NULL when the task dies).
BTW, thanks for doing this!
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/