[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080910163205.GA478@tv-sign.ru>
Date: Wed, 10 Sep 2008 20:32:05 +0400
From: Oleg Nesterov <oleg@...sign.ru>
To: Frank Mayhar <fmayhar@...gle.com>
Cc: Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
Roland McGrath <roland@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Alexey Dobriyan <adobriyan@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists