linux_dsm_epyc7002/drivers/net/ethernet/qlogic/qede
Michal Kalderon af6565adb0 qede: Fix race between rdma destroy workqueue and link change event
If an event is added while the rdma workqueue is being destroyed
it could lead to several races, list corruption, null pointer
dereference during queue_work or init_queue.
This fixes the race between the two flows which can occur during
shutdown.

A kref object and a completion object are added to the rdma_dev
structure, these are initialized before the workqueue is created.
The refcnt is used to indicate work is being added to the
workqueue and ensures the cleanup flow won't start while we're in
the middle of adding the event.
Once the work is added, the refcnt is decreased and the cleanup flow
is safe to run.

Fixes: cee9fbd8e2 ("qede: Add qedr framework")
Signed-off-by: Ariel Elior <ariel.elior@marvell.com>
Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-02-18 12:05:53 -08:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
qede_dcbnl.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 440 2019-06-05 17:37:17 +02:00
qede_ethtool.c qed*: Fix size of config attribute dump. 2019-09-11 15:15:23 +01:00
qede_filter.c qede: Fix multicast mac configuration 2019-12-12 11:08:36 -08:00
qede_fp.c qed: FW 8.42.2.0 HSI changes 2020-01-27 14:35:32 +01:00
qede_main.c qede: Disable hardware gro when xdp prog is installed 2019-12-20 21:45:11 -08:00
qede_ptp.c net: Introduce peer to peer one step PTP time stamping. 2019-12-25 19:51:34 -08:00
qede_ptp.h qede: Add support for PTP resource locking. 2017-04-27 16:51:34 -04:00
qede_rdma.c qede: Fix race between rdma destroy workqueue and link change event 2020-02-18 12:05:53 -08:00
qede.h qede: Fix race between rdma destroy workqueue and link change event 2020-02-18 12:05:53 -08:00