]>
Commit | Line | Data |
---|---|---|
0ee3da53 GKH |
1 | From foo@baz Sat Apr 20 16:43:09 CEST 2019 |
2 | From: Ido Schimmel <idosch@mellanox.com> | |
3 | Date: Wed, 10 Apr 2019 06:58:13 +0000 | |
4 | Subject: mlxsw: core: Do not use WQ_MEM_RECLAIM for EMAD workqueue | |
5 | ||
6 | From: Ido Schimmel <idosch@mellanox.com> | |
7 | ||
8 | [ Upstream commit a8c133b06183c529c51cd0d54eb57d6b7078370c ] | |
9 | ||
10 | The EMAD workqueue is used to handle retransmission of EMAD packets that | |
11 | contain configuration data for the device's firmware. | |
12 | ||
13 | Given the workers need to allocate these packets and that the code is | |
14 | not called as part of memory reclaim path, remove the WQ_MEM_RECLAIM | |
15 | flag. | |
16 | ||
17 | Fixes: d965465b60ba ("mlxsw: core: Fix possible deadlock") | |
18 | Signed-off-by: Ido Schimmel <idosch@mellanox.com> | |
19 | Acked-by: Jiri Pirko <jiri@mellanox.com> | |
20 | Signed-off-by: David S. Miller <davem@davemloft.net> | |
21 | Signed-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; |