]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - queue-5.0/mlxsw-core-do-not-use-wq_mem_reclaim-for-emad-workqueue.patch
5.0-stable patches
[thirdparty/kernel/stable-queue.git] / queue-5.0 / mlxsw-core-do-not-use-wq_mem_reclaim-for-emad-workqueue.patch
CommitLineData
0ee3da53
GKH
1From foo@baz Sat Apr 20 16:43:09 CEST 2019
2From: Ido Schimmel <idosch@mellanox.com>
3Date: Wed, 10 Apr 2019 06:58:13 +0000
4Subject: mlxsw: core: Do not use WQ_MEM_RECLAIM for EMAD workqueue
5
6From: Ido Schimmel <idosch@mellanox.com>
7
8[ Upstream commit a8c133b06183c529c51cd0d54eb57d6b7078370c ]
9
10The EMAD workqueue is used to handle retransmission of EMAD packets that
11contain configuration data for the device's firmware.
12
13Given the workers need to allocate these packets and that the code is
14not called as part of memory reclaim path, remove the WQ_MEM_RECLAIM
15flag.
16
17Fixes: d965465b60ba ("mlxsw: core: Fix possible deadlock")
18Signed-off-by: Ido Schimmel <idosch@mellanox.com>
19Acked-by: Jiri Pirko <jiri@mellanox.com>
20Signed-off-by: David S. Miller <davem@davemloft.net>
21Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22---
23 drivers/net/ethernet/mellanox/mlxsw/core.c | 2 +-
24 1 file changed, 1 insertion(+), 1 deletion(-)
25
26--- a/drivers/net/ethernet/mellanox/mlxsw/core.c
27+++ b/drivers/net/ethernet/mellanox/mlxsw/core.c
28@@ -568,7 +568,7 @@ static int mlxsw_emad_init(struct mlxsw_
29 if (!(mlxsw_core->bus->features & MLXSW_BUS_F_TXRX))
30 return 0;
31
32- emad_wq = alloc_workqueue("mlxsw_core_emad", WQ_MEM_RECLAIM, 0);
33+ emad_wq = alloc_workqueue("mlxsw_core_emad", 0, 0);
34 if (!emad_wq)
35 return -ENOMEM;
36 mlxsw_core->emad_wq = emad_wq;