* [Patch net-next] vxlan: fix a soft lockup in vxlan module removal
@ 2013-08-07 8:43 Cong Wang
2013-08-07 15:31 ` Stephen Hemminger
2013-08-09 18:42 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Cong Wang @ 2013-08-07 8:43 UTC (permalink / raw)
To: netdev; +Cc: David S. Miller, Stephen Hemminger, Cong Wang
From: Cong Wang <amwang@redhat.com>
This is a regression introduced by:
commit fe5c3561e6f0ac7c9546209f01351113c1b77ec8
Author: stephen hemminger <stephen@networkplumber.org>
Date: Sat Jul 13 10:18:18 2013 -0700
vxlan: add necessary locking on device removal
The problem is that vxlan_dellink(), which is called with RTNL lock
held, tries to flush the workqueue synchronously, but apparently
igmp_join and igmp_leave work need to hold RTNL lock too, therefore we
have a soft lockup!
As suggested by Stephen, probably the flush_workqueue can just be
removed and let the normal refcounting work. The workqueue has a
reference to device and socket, therefore the cleanups should work
correctly.
Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: David S. Miller <davem@davemloft.net>
Tested-by: Cong Wang <amwang@redhat.com>
Signed-off-by: Cong Wang <amwang@redhat.com>
---
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 8bf31d9..c51ef9b 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1837,8 +1837,6 @@ static void vxlan_dellink(struct net_device *dev, struct list_head *head)
struct vxlan_net *vn = net_generic(dev_net(dev), vxlan_net_id);
struct vxlan_dev *vxlan = netdev_priv(dev);
- flush_workqueue(vxlan_wq);
-
spin_lock(&vn->sock_lock);
hlist_del_rcu(&vxlan->hlist);
spin_unlock(&vn->sock_lock);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Patch net-next] vxlan: fix a soft lockup in vxlan module removal
2013-08-07 8:43 [Patch net-next] vxlan: fix a soft lockup in vxlan module removal Cong Wang
@ 2013-08-07 15:31 ` Stephen Hemminger
2013-08-09 18:42 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2013-08-07 15:31 UTC (permalink / raw)
To: Cong Wang; +Cc: netdev, David S. Miller
On Wed, 7 Aug 2013 16:43:22 +0800
Cong Wang <amwang@redhat.com> wrote:
> From: Cong Wang <amwang@redhat.com>
>
> This is a regression introduced by:
>
> commit fe5c3561e6f0ac7c9546209f01351113c1b77ec8
> Author: stephen hemminger <stephen@networkplumber.org>
> Date: Sat Jul 13 10:18:18 2013 -0700
>
> vxlan: add necessary locking on device removal
>
> The problem is that vxlan_dellink(), which is called with RTNL lock
> held, tries to flush the workqueue synchronously, but apparently
> igmp_join and igmp_leave work need to hold RTNL lock too, therefore we
> have a soft lockup!
>
> As suggested by Stephen, probably the flush_workqueue can just be
> removed and let the normal refcounting work. The workqueue has a
> reference to device and socket, therefore the cleanups should work
> correctly.
>
> Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
> Cc: Stephen Hemminger <stephen@networkplumber.org>
> Cc: David S. Miller <davem@davemloft.net>
> Tested-by: Cong Wang <amwang@redhat.com>
> Signed-off-by: Cong Wang <amwang@redhat.com>
>
> ---
> diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
> index 8bf31d9..c51ef9b 100644
> --- a/drivers/net/vxlan.c
> +++ b/drivers/net/vxlan.c
> @@ -1837,8 +1837,6 @@ static void vxlan_dellink(struct net_device *dev, struct list_head *head)
> struct vxlan_net *vn = net_generic(dev_net(dev), vxlan_net_id);
> struct vxlan_dev *vxlan = netdev_priv(dev);
>
> - flush_workqueue(vxlan_wq);
> -
> spin_lock(&vn->sock_lock);
> hlist_del_rcu(&vxlan->hlist);
> spin_unlock(&vn->sock_lock);
Thanks for testing this.
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Patch net-next] vxlan: fix a soft lockup in vxlan module removal
2013-08-07 8:43 [Patch net-next] vxlan: fix a soft lockup in vxlan module removal Cong Wang
2013-08-07 15:31 ` Stephen Hemminger
@ 2013-08-09 18:42 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2013-08-09 18:42 UTC (permalink / raw)
To: amwang; +Cc: netdev, stephen
From: Cong Wang <amwang@redhat.com>
Date: Wed, 7 Aug 2013 16:43:22 +0800
> From: Cong Wang <amwang@redhat.com>
>
> This is a regression introduced by:
>
> commit fe5c3561e6f0ac7c9546209f01351113c1b77ec8
> Author: stephen hemminger <stephen@networkplumber.org>
> Date: Sat Jul 13 10:18:18 2013 -0700
>
> vxlan: add necessary locking on device removal
>
> The problem is that vxlan_dellink(), which is called with RTNL lock
> held, tries to flush the workqueue synchronously, but apparently
> igmp_join and igmp_leave work need to hold RTNL lock too, therefore we
> have a soft lockup!
>
> As suggested by Stephen, probably the flush_workqueue can just be
> removed and let the normal refcounting work. The workqueue has a
> reference to device and socket, therefore the cleanups should work
> correctly.
>
> Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
> Cc: Stephen Hemminger <stephen@networkplumber.org>
> Cc: David S. Miller <davem@davemloft.net>
> Tested-by: Cong Wang <amwang@redhat.com>
> Signed-off-by: Cong Wang <amwang@redhat.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-08-09 18:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-07 8:43 [Patch net-next] vxlan: fix a soft lockup in vxlan module removal Cong Wang
2013-08-07 15:31 ` Stephen Hemminger
2013-08-09 18:42 ` David Miller
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).