kernel-fxtec-pro1x/drivers/net/ethernet/qlogic
Michal Kalderon 1e8ebca506 qede: Fix race between rdma destroy workqueue and link change event
[ Upstream commit af6565adb02d3129d3fae4d9d5da945abaf4417a ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-05 16:42:17 +01:00
..
netxen
qed qed: reduce maximum stack frame size 2020-01-27 14:51:02 +01:00
qede qede: Fix race between rdma destroy workqueue and link change event 2020-03-05 16:42:17 +01:00
qlcnic qlcnic: Fix CPU soft lockup while collecting firmware dump 2020-02-05 14:43:52 +00:00
qlge
Kconfig
Makefile
qla3xxx.c net: qlogic: Fix error paths in ql_alloc_large_buffers() 2019-12-31 16:34:39 +01:00
qla3xxx.h