linux_dsm_epyc7002/drivers/infiniband/hw
Somnath Kotur d5917307bb bnxt_re: Fix race between the netdev register and unregister events
Upon receipt of the NETDEV_REGISTER event from the netdev notifier chain,
the IB stack registration is spawned off to a workqueue since that also
requires an rtnl lock.
There could be 2 kinds of races between the NETDEV_REGISTER and the
NETDEV_UNREGISTER event handling.
a)The NETDEV_UNREGISTER event is received in rapid succession after
the NETDEV_REGISTER event even before the work queue got a chance to run.
b)The NETDEV_UNREGISTER event is received while the workqueue that handles
registration with the IB stack is still in progress.

Handle both the races with a bit flag that is set just before the work item
is queued and cleared in the workqueue after the event is handled just
before the workqueue item is freed.

While adding the new flag, it was noted that the flags are all used in
*_bit() operations which expect a bit number and not a literal constant
with a bit set.  So change the numbers to be bit numbers.

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2017-09-22 13:57:32 -04:00
..
bnxt_re bnxt_re: Fix race between the netdev register and unregister events 2017-09-22 13:57:32 -04:00
cxgb3 RDMA: Simplify get firmware interface 2017-08-10 13:28:10 +03:00
cxgb4 iw_cxgb4: remove the stid on listen create failure 2017-09-22 12:59:42 -04:00
hfi1 IB/hfi1: Convert qp_stats debugfs interface to use new iterator API 2017-08-28 19:12:30 -04:00
hns Merge branch 'k.o/for-4.13-rc' into k.o/for-next 2017-08-18 14:12:04 -04:00
i40iw i40iw: Add support for port reuse on active side connections 2017-09-22 13:43:36 -04:00
mlx4 IB/core: Separate CQ handle in SRQ context 2017-08-29 08:30:16 -04:00
mlx5 IB/mlx5: fix debugfs cleanup 2017-09-22 13:17:32 -04:00
mthca RDMA/mthca: Make explicit conversion to 64bit value 2017-08-24 16:27:10 -04:00
nes RDMA/nes: Remove zeroed parameter from port query callback 2017-08-24 16:44:48 -04:00
ocrdma IB/ocrdma: fix incorrect fall-through on switch statement 2017-09-22 13:16:00 -04:00
qedr RDMA/qedr: fix spelling mistake: "invlaid" -> "invalid" 2017-08-24 17:34:57 -04:00
qib IB/qib: Convert qp_stats debugfs interface to use new iterator API 2017-08-28 19:12:30 -04:00
usnic IB/usnic: check for allocation failure 2017-08-28 19:12:24 -04:00
vmw_pvrdma RDMA/vmw_pvrdma: Fix reporting correct opcodes for completion 2017-09-22 13:32:22 -04:00
Makefile RDMA/bnxt_re: Add bnxt_re driver build support 2017-02-14 09:51:28 -05:00