public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: Frank Mayhar <fmayhar@google.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org, Roland McGrath <roland@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 2.6.27-rc5] Fix itimer/many thread hang.
Date: Wed, 10 Sep 2008 20:32:05 +0400	[thread overview]
Message-ID: <20080910163205.GA478@tv-sign.ru> (raw)
In-Reply-To: <1220992172.23059.20.camel@bobble.smo.corp.google.com>

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.


  parent reply	other threads:[~2008-09-10 16:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-08 20:44 [PATCH 2.6.27-rc5] Fix itimer/many thread hang Frank Mayhar
2008-09-09  7:03 ` Ingo Molnar
2008-09-09 16:01   ` Oleg Nesterov
2008-09-09 16:13     ` Oleg Nesterov
2008-09-09 20:29     ` Frank Mayhar
2008-09-10 12:12       ` Oleg Nesterov
2008-09-10 17:50         ` Frank Mayhar
2008-09-10 16:32       ` Oleg Nesterov [this message]
2008-09-10  4:04     ` Roland McGrath
2008-09-10 11:44       ` Oleg Nesterov
2008-09-10  3:59 ` Roland McGrath

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080910163205.GA478@tv-sign.ru \
    --to=oleg@tv-sign.ru \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=fmayhar@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=roland@redhat.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox