All of lore.kernel.org
 help / color / mirror / Atom feed
From: longli@linuxonhyperv.com
To: Matan Azrad <matan@nvidia.com>, Ferruh Yigit <ferruh.yigit@xilinx.com>
Cc: dev@dpdk.org, Long Li <longli@microsoft.com>
Subject: [PATCH] net/mlx5: fix verbs fd leak in the secondary process
Date: Wed,  6 Jul 2022 10:22:25 -0700	[thread overview]
Message-ID: <1657128145-7764-2-git-send-email-longli@linuxonhyperv.com> (raw)
In-Reply-To: <1657128145-7764-1-git-send-email-longli@linuxonhyperv.com>

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


      reply	other threads:[~2022-07-06 17:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-06 17:22 [PATCH] net/mlx4: fix verbs cmd fd leak in the secondary process longli
2022-07-06 17:22 ` longli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1657128145-7764-2-git-send-email-longli@linuxonhyperv.com \
    --to=longli@linuxonhyperv.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@xilinx.com \
    --cc=longli@microsoft.com \
    --cc=matan@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.