* [PATCH] net/mlx4: fix verbs cmd fd leak in the secondary process
@ 2022-07-06 17:22 longli
2022-07-06 17:22 ` [PATCH] net/mlx5: fix verbs " longli
0 siblings, 1 reply; 2+ messages in thread
From: longli @ 2022-07-06 17:22 UTC (permalink / raw)
To: Matan Azrad, Ferruh Yigit; +Cc: dev, Long Li
From: Long Li <longli@microsoft.com>
FDs passed from rte_mp_msg are duplicated to the secondary process and
need to be closed.
Fixes: 0203d33a10 ("net/mlx4: support secondary process")
Signed-off-by: Long Li <longli@microsoft.com>
---
drivers/net/mlx4/mlx4_txq.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/mlx4/mlx4_txq.c b/drivers/net/mlx4/mlx4_txq.c
index 0db2e55bef..bf7e036e19 100644
--- a/drivers/net/mlx4/mlx4_txq.c
+++ b/drivers/net/mlx4/mlx4_txq.c
@@ -146,6 +146,7 @@ mlx4_tx_uar_init_secondary(struct rte_eth_dev *dev, int fd)
if (ret)
goto error;
}
+ close(fd);
return 0;
error:
/* Rollback. */
@@ -155,6 +156,7 @@ mlx4_tx_uar_init_secondary(struct rte_eth_dev *dev, int fd)
continue;
txq_uar_uninit_secondary(txq);
} while (i--);
+ close(fd);
return -rte_errno;
}
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] net/mlx5: fix verbs fd leak in the secondary process
2022-07-06 17:22 [PATCH] net/mlx4: fix verbs cmd fd leak in the secondary process longli
@ 2022-07-06 17:22 ` longli
0 siblings, 0 replies; 2+ messages in thread
From: longli @ 2022-07-06 17:22 UTC (permalink / raw)
To: Matan Azrad, Ferruh Yigit; +Cc: dev, Long Li
From: Long Li <longli@microsoft.com>
FDs passed from rte_mp_msg are duplicated to the secondary process and
need to be closed.
Fixes: 9a8ab29b84 ("net/mlx5: replace IPC socket with EAL API")
Signed-off-by: Long Li <longli@microsoft.com>
---
drivers/net/mlx5/mlx5_txq.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 4e0bf7af9c..df55a4cd25 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -636,6 +636,7 @@ mlx5_tx_uar_init_secondary(struct rte_eth_dev *dev, int fd)
if (ret)
goto error;
}
+ close(fd);
return 0;
error:
/* Rollback. */
@@ -646,6 +647,7 @@ mlx5_tx_uar_init_secondary(struct rte_eth_dev *dev, int fd)
txq_ctrl = container_of(txq, struct mlx5_txq_ctrl, txq);
txq_uar_uninit_secondary(txq_ctrl);
} while (i--);
+ close(fd);
return -rte_errno;
}
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-06 17:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-06 17:22 [PATCH] net/mlx4: fix verbs cmd fd leak in the secondary process longli
2022-07-06 17:22 ` [PATCH] net/mlx5: fix verbs " longli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).