]> git.baikalelectronics.ru Git - kernel.git/commit
vxlan: fix a soft lockup in vxlan module removal
authorCong Wang <amwang@redhat.com>
Wed, 7 Aug 2013 08:43:22 +0000 (16:43 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Aug 2013 18:41:45 +0000 (11:41 -0700)
commit02380e208dd5d0be3882612422bf2b8d27dd5a9e
tree3bb4e4ebfe8eb440ff7ee0246103b4acea8fc93b
parent868ae48b729f00c8a97f335b1ec6926992bb496b
vxlan: fix a soft lockup in vxlan module removal

This is a regression introduced by:

commit 1b112b73668d0ef014d37c92d3efbfe9d53bc689
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>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan.c