From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Nicholas Mc Guire <der.herr@hofr.at>,
Kevin Hao <haokexin@gmail.com>,
linux-rt-users@vger.kernel.org, rostedt@goodmis.org
Subject: Re: [PATCH v3.14-rt] netpoll: guard the access to dev->npinfo with rcu_read_lock/unlock_bh() for CONFIG_PREEMPT_RT_FULL=y
Date: Tue, 17 Feb 2015 08:16:38 -0800 [thread overview]
Message-ID: <20150217161637.GY4166@linux.vnet.ibm.com> (raw)
In-Reply-To: <20150217142953.GS26177@linutronix.de>
On Tue, Feb 17, 2015 at 03:29:53PM +0100, Sebastian Andrzej Siewior wrote:
> * Paul E. McKenney | 2014-12-03 13:19:11 [-0800]:
>
> >> Is that not actually a bug indepedent of RT ?
> >> without the rcu_read_lock/unlock who says that the
> >> rcu_dereference is still valid at this point ?
> >> I though that if bh are already disabled you still
> >> need the read_lock. disabled bh would allow to "downgrad"
> >> the rcu_read_lock_bh to rcu_read_lock but you still need it.
> >
> >In vanilla kernels, anything that disables BH acts as rcu_read_lock_bh().
> >So yes, you can have cases where rcu_read_lock_bh() is needed only in
> >the -rt kernel.
>
> But it won't hurt mainline using rcu_read_lock_bh() around
> rcu_dereference_bh() right?
Using rcu_read_lock_bh() around rcu_dereference_bh() is completely
legal, yes.
> I am not going to apply this because that code is gone shortly after
> v3.14 was released. The fm10k however does the same thing so atleast RCU
> knows when to scream :)
That is good, because it has been a good long time since I could
reasonably review all code in the kernel that uses RCU. ;-)
Thanx, Paul
> Sebastian
>
prev parent reply other threads:[~2015-02-17 16:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-03 12:05 [PATCH v3.14-rt] netpoll: guard the access to dev->npinfo with rcu_read_lock/unlock_bh() for CONFIG_PREEMPT_RT_FULL=y Kevin Hao
2014-12-03 12:50 ` Nicholas Mc Guire
2014-12-03 21:19 ` Paul E. McKenney
2015-02-17 14:29 ` Sebastian Andrzej Siewior
2015-02-17 16:16 ` Paul E. McKenney [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=20150217161637.GY4166@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=bigeasy@linutronix.de \
--cc=der.herr@hofr.at \
--cc=haokexin@gmail.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=rostedt@goodmis.org \
/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;
as well as URLs for NNTP newsgroup(s).