[Vivid][SRU][PATCH 2/2] net/mlx4_core: need to call close fw if alloc icm is called twice

Chris J Arges chris.j.arges at canonical.com
Mon Jul 13 14:21:00 UTC 2015


From: Carol Soto <clsoto at linux.vnet.ibm.com>

BugLink: http://bugs.launchpad.net/bugs/1473883

If mlx4_enable_sriov is called by adapter without this
feature MLX4_DEV_CAP_FLAG2_SYS_EQS then during this path the function alloc
icm is called twice without freeing the structures from the first time.

Acked-by: Or Gerlitz <ogerlitz at mellanox.com>
Signed-off-by: Carol L Soto <clsoto at linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
(cherry picked from commit ed3d2276ef72be23c6367358d80004130d8c797d)
Signed-off-by: Chris J Arges <chris.j.arges at canonical.com>
---
 drivers/net/ethernet/mellanox/mlx4/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
index e25cba1..4e342968 100644
--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -2749,6 +2749,7 @@ slave_start:
 								  existing_vfs,
 								  reset_flow);
 
+				mlx4_close_fw(dev);
 				mlx4_cmd_cleanup(dev, MLX4_CMD_CLEANUP_ALL);
 				dev->flags = dev_flags;
 				if (!SRIOV_VALID_STATE(dev->flags)) {
-- 
1.9.1





More information about the kernel-team mailing list