]> git.baikalelectronics.ru Git - kernel.git/commit
IPoIB: Fix deadlock on RTNL in ipoib_stop()
authorRoland Dreier <rolandd@cisco.com>
Tue, 19 Aug 2008 22:01:32 +0000 (15:01 -0700)
committerRoland Dreier <rolandd@cisco.com>
Tue, 19 Aug 2008 22:01:32 +0000 (15:01 -0700)
commitda14a335658294430383876eb7728009e211c4c9
tree14f0b4a4e50f4e112d3189c75357e34829d78704
parent81854c6e0b071df8be8f8f9476f37437175d8dc5
IPoIB: Fix deadlock on RTNL in ipoib_stop()

Commit f46acbc8 ("IPoIB: Use rtnl lock/unlock when changing device
flags") added a call to rtnl_lock() in ipoib_mcast_join_task(), which
is run from the ipoib_workqueue.  However, ipoib_stop() (which is run
inside rtnl_lock()) flushes this workqueue, which leads to a deadlock
if the join task is pending.

Fix this by simply not flushing the workqueue from ipoib_stop().  It
turns out that we really don't care about workqueue tasks running
during or after ipoib_stop(), as long as we make sure to flush the
workqueue before unregistering a netdev.

This fixes <https://bugs.openfabrics.org/show_bug.cgi?id=1114>.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/ulp/ipoib/ipoib_main.c
drivers/infiniband/ulp/ipoib/ipoib_multicast.c