lkml.org 
[lkml]   [2008]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [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.



    \
     
     \ /
      Last update: 2008-09-10 18:29    [W:0.020 / U:0.328 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site