From: Michael Baum <michaelba@nvidia.com> To: <dev@dpdk.org> Cc: Matan Azrad <matan@nvidia.com>, Raslan Darawsheh <rasland@nvidia.com>, Viacheslav Ovsiienko <viacheslavo@nvidia.com>, <stable@dpdk.org> Subject: [dpdk-stable] [PATCH_v3 2/3] regex/mlx5: fix leak in PCI remove function Date: Wed, 7 Jul 2021 15:03:02 +0300 Message-ID: <20210707120303.2490006-3-michaelba@nvidia.com> (raw) In-Reply-To: <20210707120303.2490006-1-michaelba@nvidia.com> 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
next prev parent reply other threads:[~2021-07-07 12:03 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 ` [dpdk-stable] [dpdk-dev] " Ori Kam 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 ` Michael Baum [this message] 2021-07-07 12:03 ` [dpdk-stable] [PATCH_v3 " 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=20210707120303.2490006-3-michaelba@nvidia.com \ --to=michaelba@nvidia.com \ --cc=dev@dpdk.org \ --cc=matan@nvidia.com \ --cc=rasland@nvidia.com \ --cc=stable@dpdk.org \ --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
patches for DPDK stable branches This inbox may be cloned and mirrored by anyone: git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \ stable@dpdk.org public-inbox-index stable Example config snippet for mirrors. Newsgroup available over NNTP: nntp://inbox.dpdk.org/inbox.dpdk.stable AGPL code for this site: git clone https://public-inbox.org/public-inbox.git