From: Ori Kam <orika@nvidia.com>
To: Michael Baum <michaelba@nvidia.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: Matan Azrad <matan@nvidia.com>,
NBU-Contact-Thomas Monjalon <thomas@monjalon.net>,
"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH_v4 2/3] regex/mlx5: fix leak in PCI remove function
Date: Wed, 21 Jul 2021 06:21:52 +0000 [thread overview]
Message-ID: <DM8PR12MB540099ED04EAAAF61CBC851CD6E39@DM8PR12MB5400.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20210712070644.2848418-3-michaelba@nvidia.com>
Hi Michael,
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Michael Baum
> Sent: Monday, July 12, 2021 10:07 AM
>
> In the PCI removal function, PMD releases all driver resources allocated in
> the probe function.
>
> The MR btree memory is allocated in the probe function, but it is not freed in
> remove function what caused a memory leak.
>
> Release it.
>
> Fixes: cda883bbb655 ("regex/mlx5: add dynamic memory registration to
> datapath")
> Cc: stable@dpdk.org
>
> Signed-off-by: Michael Baum <michaelba@nvidia.com>
> ---
> drivers/regex/mlx5/mlx5_regex.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/regex/mlx5/mlx5_regex.c
> b/drivers/regex/mlx5/mlx5_regex.c index 0f12d94d7e..f64dc2824c 100644
> --- a/drivers/regex/mlx5/mlx5_regex.c
> +++ b/drivers/regex/mlx5/mlx5_regex.c
> @@ -280,6 +280,8 @@ mlx5_regex_pci_remove(struct rte_pci_device
> *pci_dev)
> if (TAILQ_EMPTY(&mlx5_mem_event_list))
>
> rte_mem_event_callback_unregister("MLX5_MEM_EVENT_CB",
> NULL);
> + if (priv->mr_scache.cache.table)
> + mlx5_mr_release_cache(&priv->mr_scache);
> if (priv->pd)
> mlx5_glue->dealloc_pd(priv->pd);
> if (priv->uar)
> --
> 2.25.1
Acked-by: Ori Kam <orika@nvidia.com>
Thanks,
Ori
next prev parent reply other threads:[~2021-07-21 6:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-28 19:23 [dpdk-stable] [PATCH 1/3] regex/mlx5: fix memory region unregistration Michael Baum
2021-06-28 19:23 ` [dpdk-stable] [PATCH 2/3] regex/mlx5: fix leak in PCI remove function Michael Baum
2021-06-28 19:23 ` [dpdk-stable] [PATCH 3/3] regex/mlx5: fix redundancy " Michael Baum
2021-06-30 5:52 ` [dpdk-stable] [PATCH 1/3] regex/mlx5: fix memory region unregistration Matan Azrad
2021-07-05 5:27 ` [dpdk-stable] [PATCH_v2 " Michael Baum
2021-07-05 5:27 ` [dpdk-stable] [PATCH_v2 2/3] regex/mlx5: fix leak in PCI remove function Michael Baum
2021-07-05 5:27 ` [dpdk-stable] [PATCH_v2 3/3] regex/mlx5: fix redundancy " Michael Baum
[not found] ` <20210707120303.2490006-1-michaelba@nvidia.com>
2021-07-07 12:03 ` [dpdk-stable] [PATCH_v3 1/3] regex/mlx5: fix memory region unregistration Michael Baum
[not found] ` <20210712070644.2848418-1-michaelba@nvidia.com>
2021-07-12 7:06 ` [dpdk-stable] [PATCH_v4 " Michael Baum
2021-07-21 6:25 ` Ori Kam
2021-07-12 7:06 ` [dpdk-stable] [PATCH_v4 2/3] regex/mlx5: fix leak in PCI remove function Michael Baum
2021-07-21 6:21 ` Ori Kam [this message]
2021-07-12 7:06 ` [dpdk-stable] [PATCH_v4 3/3] regex/mlx5: fix redundancy " Michael Baum
2021-07-21 6:23 ` Ori Kam
2021-07-07 12:03 ` [dpdk-stable] [PATCH_v3 2/3] regex/mlx5: fix leak " Michael Baum
2021-07-07 12:03 ` [dpdk-stable] [PATCH_v3 3/3] regex/mlx5: fix redundancy " Michael Baum
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=DM8PR12MB540099ED04EAAAF61CBC851CD6E39@DM8PR12MB5400.namprd12.prod.outlook.com \
--to=orika@nvidia.com \
--cc=dev@dpdk.org \
--cc=matan@nvidia.com \
--cc=michaelba@nvidia.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/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).