Re: [PATCH 2/7] netpoll: make __netpoll_cleanup non-block |
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Neil Horman <nhorman@xxxxxxxxxxxxx>
- Subject: Re: [PATCH 2/7] netpoll: make __netpoll_cleanup non-block
- From: Cong Wang <amwang@xxxxxxxxxx>
- Date: Mon, 30 Jul 2012 09:42:01 +0800
- Cc: bridge@xxxxxxxxxxxxxxxxxxxxxxxxxx, Jiri Pirko <jiri@xxxxxxxxxxx>, netdev@xxxxxxxxxxxxxxx, Jay Vosburgh <fubar@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, Eric Dumazet <edumazet@xxxxxxxxxx>, Joe Perches <joe@xxxxxxxxxxx>, Cong Wang <xiyou.wangcong@xxxxxxxxx>, Stephen Hemminger <shemminger@xxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>
- Delivered-to: bridge@xxxxxxxxxxxxxxxxxxxxxxxx
- In-reply-to: <20120727184031.GB20938@hmsreliant.think-freely.org>
- References: <1343403484-29347-1-git-send-email-amwang@redhat.com> <1343403484-29347-3-git-send-email-amwang@redhat.com> <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@xxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Thanks.
[Netdev]
[AoE Tools]
[Linux Wireless]
[Kernel Newbies]
[Security]
[Linux for Hams]
[Netfilter]
[Bugtraq]
[Photo]
[Yosemite]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux RAID]
[Linux Admin]
[Samba]
[Video 4 Linux]
[Linux Resources]