Messages in this thread | | | Date | Wed, 10 Sep 2008 20:32:05 +0400 | From | Oleg Nesterov <> | Subject | Re: [PATCH 2.6.27-rc5] Fix itimer/many thread hang. |
| |
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.
| |