From: Oleg Nesterov <oleg@redhat.com>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Valdis.Kletnieks@vt.edu,
Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
linux-kernel@vger.kernel.org
Subject: Re: mmotm 2010-04-05 - another RCU whinge (not network this time)
Date: Mon, 12 Apr 2010 20:32:51 +0200 [thread overview]
Message-ID: <20100412183251.GA13391@redhat.com> (raw)
In-Reply-To: <20100410051504.GA2414@linux.vnet.ibm.com>
On 04/09, Paul E. McKenney wrote:
>
> > Oleg, looks like proc-make-collect_sigign_sigcatch-rcu-safe.patch is the
> > offender here, it added the line that causes the whinge.
>
> If collect_sigign_sigcatch() is OK to call by updaters as well as
> readers, we need something like:
>
> struct sighand_struct *sighand;
>
> sighand = rcu_dereference_check(p->sighand,
> rcu_read_lock_held() ||
> lockdep_is_held(&???));
>
> Where the "???" is replaced with whichever of the two locks is protecting
> updates. My guess would be the sighand lock, but I would not rely on
> my guesses in this case. ;-)
Yes, it should be p->sighand->siglock.
Actually, I was going to change another caller, do_task_stat(), to call
collect_sigign_sigcatch() without ->siglock too, but now I am not sure
when/if this will happen.
OK, thanks, I'll send the patch to make rcu_dereference_check() happy.
While we are here... __exit_signal() does
sighand = rcu_dereference_check(tsk->sighand,
rcu_read_lock_held() ||
lockdep_tasklist_lock_is_held());
What is the point? We know that the single caller must hold tasklist,
otherwise everything is broken. Perhaps it would be better to
use rcu_dereference_raw() ?
In fact, I don't really understand why __exit_signal() needs
rcu_dereference() at all.
Oleg.
prev parent reply other threads:[~2010-04-12 18:35 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-05 23:09 mmotm 2010-04-05-16-09 uploaded akpm
2010-04-06 5:04 ` [PATCH mmotm] hid-picolcd: depends on LCD_CLASS_DEVICE Randy Dunlap
2010-04-06 8:40 ` Jiri Kosina
2010-04-06 8:56 ` Bruno Prémont
2010-04-06 15:26 ` Randy Dunlap
2010-04-06 16:35 ` Bruno Prémont
2010-04-06 16:35 ` Bruno Prémont
2010-04-06 16:56 ` Randy Dunlap
2010-04-06 16:56 ` Randy Dunlap
2010-04-06 21:04 ` Bruno Prémont
2010-04-06 21:04 ` Bruno Prémont
2010-04-07 16:20 ` Randy Dunlap
2010-04-07 18:31 ` Bruno Prémont
2010-04-07 18:31 ` Bruno Prémont
2010-04-08 12:42 ` Jiri Kosina
2010-04-08 12:42 ` Jiri Kosina
2010-04-11 10:17 ` Bruno Prémont
2010-04-11 10:17 ` Bruno Prémont
2010-04-11 18:28 ` Jiri Kosina
2010-04-11 18:28 ` Jiri Kosina
2010-04-07 18:44 ` Bruno Prémont
2010-04-07 20:12 ` Randy Dunlap
2010-04-07 20:12 ` Randy Dunlap
2010-04-07 20:29 ` Bruno Prémont
2010-04-07 20:29 ` Bruno Prémont
2010-04-07 18:01 ` mmotm 2010-04-05-16-09 uploaded Valdis.Kletnieks
2010-04-08 11:41 ` Patrick McHardy
2010-04-08 15:23 ` Valdis.Kletnieks
2010-04-08 15:36 ` Patrick McHardy
2010-04-09 0:50 ` Valdis.Kletnieks
2010-04-09 14:49 ` Patrick McHardy
2010-04-08 23:57 ` mmotm 2010-04-05 - another RCU whinge (not network this time) Valdis.Kletnieks
2010-04-09 23:16 ` Paul E. McKenney
2010-04-10 3:22 ` Valdis.Kletnieks
2010-04-10 5:15 ` Paul E. McKenney
2010-04-12 18:32 ` Oleg Nesterov [this message]
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=20100412183251.GA13391@redhat.com \
--to=oleg@redhat.com \
--cc=Valdis.Kletnieks@vt.edu \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulmck@linux.vnet.ibm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.