From: Cong Wang <amwang@redhat.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org
Subject: A soft lockup in vxlan module
Date: Wed, 07 Aug 2013 09:23:54 +0800 [thread overview]
Message-ID: <1375838634.11370.13.camel@cr0> (raw)
Hi, Stephen
You introduced a soft lockup in vxlan module in
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! This is 100% reproducible on my 2.6.32 backport
while running `modprobe -r vxlan`.
A quick but perhaps ugly fix is just releasing RTNL lock before calling
flush_workqueue():
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 8bf31d9..581d3d5 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1837,7 +1837,9 @@ 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);
+ rtnl_unlock();
flush_workqueue(vxlan_wq);
+ rtnl_lock();
spin_lock(&vn->sock_lock);
hlist_del_rcu(&vxlan->hlist);
However, I think a better way is still what I did, that is, removing
RTNL lock from ip_mc_join_group() and ip_mc_leave_group().
What do you think? Any other idea to fix it?
Thanks.
next reply other threads:[~2013-08-07 1:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-07 1:23 Cong Wang [this message]
2013-08-07 2:18 ` A soft lockup in vxlan module Stephen Hemminger
2013-08-07 2:34 ` Cong Wang
2013-08-07 4:13 ` Stephen Hemminger
2013-08-07 6:47 ` 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=1375838634.11370.13.camel@cr0 \
--to=amwang@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.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).