linux_dsm_epyc7002/drivers/infiniband/ulp/ipoib
Doug Ledford 894021a752 IB/ipoib: Make the carrier_on_task race aware
We blindly assume that we can just take the rtnl lock and that will
prevent races with downing this interface.  Unfortunately, that's not
the case.  In ipoib_mcast_stop_thread() we will call flush_workqueue()
in an attempt to clear out all remaining instances of ipoib_join_task.
But, since this task is put on the same workqueue as the join task,
the flush_workqueue waits on this thread too.  But this thread is
deadlocked on the rtnl lock.  The better thing here is to use trylock
and loop on that until we either get the lock or we see that
FLAG_OPER_UP has been cleared, in which case we don't need to do
anything anyway and we just return.

While investigating which flag should be used, FLAG_ADMIN_UP or
FLAG_OPER_UP, it was determined that FLAG_OPER_UP was the more
appropriate flag to use.  However, there was a mix of these two flags in
use in the existing code.  So while we check for that flag here as part
of this race fix, also cleanup the two places that had used the less
appropriate flag for their tests.

Signed-off-by: Doug Ledford <dledford@redhat.com>
2015-04-15 16:06:17 -04:00
..
ipoib_cm.c Revert "IPoIB: Use dedicated workqueues per interface" 2015-01-30 15:38:55 -08:00
ipoib_ethtool.c net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
ipoib_fs.c IPoIB: Remove unnecessary test for NULL before debugfs_remove() 2014-08-12 21:59:54 -07:00
ipoib_ib.c IB/ipoib: factor out ah flushing 2015-04-15 16:06:17 -04:00
ipoib_main.c IB/ipoib: change init sequence ordering 2015-04-15 16:06:17 -04:00
ipoib_multicast.c IB/ipoib: Make the carrier_on_task race aware 2015-04-15 16:06:17 -04:00
ipoib_netlink.c infiniband: make sure the src net is infiniband when create new link 2014-01-03 20:38:56 -05:00
ipoib_verbs.c Revert "IPoIB: Use dedicated workqueues per interface" 2015-01-30 15:38:55 -08:00
ipoib_vlan.c infiniband/ipoib: implement ndo_get_iflink 2015-04-02 14:05:01 -04:00
ipoib.h Revert "IPoIB: fix MCAST_FLAG_BUSY usage" 2015-01-30 15:39:20 -08:00
Kconfig kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT 2011-01-20 17:02:05 -08:00
Makefile IB/ipoib: Add rtnl_link_ops support 2012-09-20 16:49:17 -04:00