From: David Miller <davem@davemloft.net>
To: linville@tuxdriver.com
Cc: herbert@gondor.hengli.com.au, paulmck@linux.vnet.ibm.com,
netdev@vger.kernel.org
Subject: Re: [PATCH] netpoll: use non-BH variant of RCU
Date: Wed, 11 Aug 2010 23:16:32 -0700 (PDT) [thread overview]
Message-ID: <20100811.231632.59670387.davem@davemloft.net> (raw)
In-Reply-To: <20100811153736.GA31577@tuxdriver.com>
From: "John W. Linville" <linville@tuxdriver.com>
Date: Wed, 11 Aug 2010 11:37:36 -0400
> On Wed, Aug 11, 2010 at 07:27:06AM -0400, Herbert Xu wrote:
>> On Wed, Aug 11, 2010 at 07:03:30AM -0400, Herbert Xu wrote:
>> >
>> > To use rcu_read_lock safely we'd also need to add do synchronize_rcu
>> > in addition of synchronize_rcu_bh, right Paul?
>> >
>> > Of course as we were doing this unsafely prior to my patch anyway
>> > I'm also fine with just reverting it.
>>
>> Actually, we could just disable IRQs for stable. How about this
>> patch (untested)?
>>
>> netpoll: Disable IRQ around RCU dereference in netpoll_rx
>>
>> We cannot use rcu_dereference_bh safely in netpoll_rx as we may
>> be called with IRQs disabled. We could however simply disable
>> IRQs as that too causes BH to be disabled and is safe in either
>> case.
>>
>> Thanks to John Linville for discovering this bug and providing
>> a patch.
>>
>> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
>
> This also seems to work for me.
I'll queue up this variant for -stable.
And we'll go with making use of Paul's new RCU irqsoff interface
approach for Linus's tree.
Thanks.
next prev parent reply other threads:[~2010-08-12 6:16 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-10 20:25 [PATCH] netpoll: use non-BH variant of RCU John W. Linville
2010-08-10 20:43 ` Herbert Xu
2010-08-10 21:19 ` Paul E. McKenney
2010-08-10 23:31 ` David Miller
2010-08-11 11:03 ` Herbert Xu
2010-08-11 11:27 ` Herbert Xu
2010-08-11 15:37 ` John W. Linville
2010-08-12 6:16 ` David Miller [this message]
2010-08-11 12:20 ` Paul E. McKenney
2010-08-11 22:00 ` Paul E. McKenney
2010-08-12 6:09 ` David Miller
2010-08-12 15:42 ` Paul E. McKenney
2010-08-13 14:39 ` Herbert Xu
2010-08-13 16:29 ` Paul E. McKenney
2010-08-13 17:51 ` Herbert Xu
2010-08-15 6:50 ` David Miller
2010-09-02 17:26 ` Paul E. McKenney
2010-09-03 15:34 ` David Miller
2010-09-03 15:52 ` Paul E. McKenney
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=20100811.231632.59670387.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=herbert@gondor.hengli.com.au \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.kernel.org \
--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 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).