[dpdk-stable] patch 'net/mlx5: fix resource leak in case of error' has been queued to LTS release 16.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue May 15 19:19:29 CEST 2018


Hi,

FYI, your patch has been queued to LTS release 16.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/16/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From a0ee5c102fd1589f4847f01fdd64aa66154ff1da Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland at mellanox.com>
Date: Tue, 8 May 2018 12:11:27 +0300
Subject: [PATCH] net/mlx5: fix resource leak in case of error

[ upstream commit 690de2850b26466ad5325fde3e1aff040e3868f8 ]

If something went wrong in mlx5_pci_prob the allocated eth dev
will cause a memory leak.

This commit release the eth dev that was previously allocated.

Fixes: 771fa900b73a ("mlx5: introduce new driver for Mellanox ConnectX-4 adapters")

Signed-off-by: Raslan Darawsheh <rasland at mellanox.com>
Acked-by: Yongseok Koh <yskoh at mellanox.com>
---
 drivers/net/mlx5/mlx5.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 506786c4e..eb266b2c7 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -684,6 +684,8 @@ port_error:
 			claim_zero(ibv_dealloc_pd(pd));
 		if (ctx)
 			claim_zero(ibv_close_device(ctx));
+		if (eth_dev && rte_eal_process_type() == RTE_PROC_PRIMARY)
+			rte_eth_dev_release_port(eth_dev);
 		break;
 	}
 
-- 
2.14.2



More information about the stable mailing list