From: Cong Wang <amwang@redhat.com>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: bridge@lists.linux-foundation.org, Jiri Pirko <jiri@resnulli.us>,
netdev@vger.kernel.org, Jay Vosburgh <fubar@us.ibm.com>,
linux-kernel@vger.kernel.org, Eric Dumazet <edumazet@google.com>,
Joe Perches <joe@perches.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
Stephen Hemminger <shemminger@vyatta.com>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH 2/7] netpoll: make __netpoll_cleanup non-block
Date: Mon, 30 Jul 2012 09:42:01 +0800 [thread overview]
Message-ID: <1343612521.1642.2.camel@cr0> (raw)
In-Reply-To: <20120727184031.GB20938@hmsreliant.think-freely.org>
On Fri, 2012-07-27 at 14:40 -0400, Neil Horman wrote:
> Here, and above I see you using an rcu_head to defer cleanup, until after all
> pointer uses are dropped, but I don't see any modification of code points that
> dereference any struct netpoll pointers to include
> rcu_read_lock()/rcu_read_unlock(). Without those using rcu to defer cleanup is
> pointless, as the rcu code won't know when its safe to run. You're no better
> off that you would be just calling __netpoll_cleanup directly.
Hi, Neil,
Actually they are protected by rcu_read_lock_bh() which is implied by
local_irq_disable(), see:
commit f0f9deae9e7c421fa0c1c627beb8e174325e1ba7
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date: Fri Sep 17 16:55:03 2010 -0700
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Thanks.
next prev parent reply other threads:[~2012-07-30 1:42 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-27 15:37 [PATCH 0/7] netpoll and netconsole fixes for 3.6 Cong Wang
2012-07-27 15:37 ` [PATCH 1/7] netpoll: use GFP_ATOMIC in slave_enable_netpoll() and __netpoll_setup() Cong Wang
2012-08-03 9:17 ` Eric Dumazet
2012-08-03 9:34 ` Cong Wang
2012-08-03 10:10 ` Eric Dumazet
2012-08-06 9:08 ` Cong Wang
2012-08-06 9:44 ` Eric Dumazet
2012-08-06 12:31 ` Cong Wang
2012-07-27 15:37 ` [PATCH 2/7] netpoll: make __netpoll_cleanup non-block Cong Wang
2012-07-27 18:40 ` Neil Horman
2012-07-30 1:42 ` Cong Wang [this message]
2012-07-27 15:38 ` [PATCH 3/7] netconsole: do not release spin_lock before calling __netpoll_cleanup Cong Wang
2012-07-27 15:38 ` [PATCH 4/7] bridge: call NETDEV_RELEASE notifier in br_del_if() Cong Wang
2012-07-27 15:50 ` Stephen Hemminger
2012-07-30 1:59 ` Cong Wang
2012-07-27 15:38 ` [PATCH 5/7] netpoll: take rcu_read_lock_bh() in netpoll_rx() Cong Wang
2012-07-27 15:38 ` [PATCH 6/7] netpoll: use netpoll_rx_on() " Cong Wang
2012-07-27 15:38 ` [PATCH 7/7] netpoll: take rcu_read_lock_bh() in netpoll_send_skb_on_dev() Cong Wang
2012-08-01 2:22 ` [PATCH 0/7] netpoll and netconsole fixes for 3.6 Cong Wang
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=1343612521.1642.2.camel@cr0 \
--to=amwang@redhat.com \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fubar@us.ibm.com \
--cc=jiri@resnulli.us \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=shemminger@vyatta.com \
--cc=xiyou.wangcong@gmail.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).