From: "Minggang Li(Gavin)" <gavinl@nvidia.com>
To: <viacheslavo@nvidia.com>, <matan@nvidia.com>, <orika@nvidia.com>,
<thomas@monjalon.net>, Dariusz Sosnowski <dsosnowski@nvidia.com>,
Bing Zhao <bingz@nvidia.com>, Suanming Mou <suanmingm@nvidia.com>,
Spike Du <spiked@nvidia.com>
Cc: <dev@dpdk.org>, <rasland@nvidia.com>, <stable@dpdk.org>
Subject: [PATCH V2 4/7] common/mlx5: fix Netlink socket leak
Date: Mon, 28 Oct 2024 11:18:19 +0200 [thread overview]
Message-ID: <20241028091822.860660-5-gavinl@nvidia.com> (raw)
In-Reply-To: <20241028091822.860660-1-gavinl@nvidia.com>
Fixes: 72d7efe464b1 ("common/mlx5: share interrupt management")
Cc: stable@dpdk.org
Signed-off-by: Minggang Li(Gavin) <gavinl@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/linux/mlx5_os.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 4c2caa21e9..8df45ef010 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -3076,10 +3076,15 @@ mlx5_os_dev_shared_handler_install(struct mlx5_dev_ctx_shared *sh)
void
mlx5_os_dev_shared_handler_uninstall(struct mlx5_dev_ctx_shared *sh)
{
+ int fd;
+
mlx5_os_interrupt_handler_destroy(sh->intr_handle,
mlx5_dev_interrupt_handler, sh);
+ fd = rte_intr_fd_get(sh->intr_handle_nl);
mlx5_os_interrupt_handler_destroy(sh->intr_handle_nl,
mlx5_dev_interrupt_handler_nl, sh);
+ if (fd >= 0)
+ close(fd);
#ifdef HAVE_IBV_DEVX_ASYNC
mlx5_os_interrupt_handler_destroy(sh->intr_handle_devx,
mlx5_dev_interrupt_handler_devx, sh);
--
2.34.1
parent reply other threads:[~2024-10-28 9:19 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20241028091822.860660-1-gavinl@nvidia.com>]
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=20241028091822.860660-5-gavinl@nvidia.com \
--to=gavinl@nvidia.com \
--cc=bingz@nvidia.com \
--cc=dev@dpdk.org \
--cc=dsosnowski@nvidia.com \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=rasland@nvidia.com \
--cc=spiked@nvidia.com \
--cc=stable@dpdk.org \
--cc=suanmingm@nvidia.com \
--cc=thomas@monjalon.net \
--cc=viacheslavo@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 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).