From: wangyunjian <wangyunjian@huawei.com>
To: <dev@dpdk.org>
Cc: <anatoly.burakov@intel.com>, <ferruh.yigit@intel.com>,
<david.marchand@redhat.com>, <jerry.lilijun@huawei.com>,
<xudingke@huawei.com>, Yunjian Wang <wangyunjian@huawei.com>,
<stable@dpdk.org>
Subject: [dpdk-stable] [dpdk-dev] [PATCH v2] vfio: fix mem leak when unmapping resource
Date: Fri, 11 Sep 2020 18:57:42 +0800 [thread overview]
Message-ID: <1599821862-27816-1-git-send-email-wangyunjian@huawei.com> (raw)
In-Reply-To: <20200614140034.E5CDC49E0@dpdk.org>
From: Yunjian Wang <wangyunjian@huawei.com>
The 'vfio_res' is not freed when unmapping resource by primary process.
This leads to memory leak.
Fixes: ab53203e194b ("vfio: enable unmapping resource for secondary")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
---
v2:
Update email address
---
drivers/bus/pci/linux/pci_vfio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index c15ed3bad..91131ce6a 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -1003,7 +1003,7 @@ pci_vfio_unmap_resource_primary(struct rte_pci_device *dev)
}
TAILQ_REMOVE(vfio_res_list, vfio_res, next);
-
+ rte_free(vfio_res);
return 0;
}
--
2.23.0
next parent reply other threads:[~2020-09-11 10:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200614140034.E5CDC49E0@dpdk.org>
2020-09-11 10:57 ` wangyunjian [this message]
2020-09-17 10:37 ` Burakov, Anatoly
2020-10-05 8:13 ` David Marchand
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=1599821862-27816-1-git-send-email-wangyunjian@huawei.com \
--to=wangyunjian@huawei.com \
--cc=anatoly.burakov@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=jerry.lilijun@huawei.com \
--cc=stable@dpdk.org \
--cc=xudingke@huawei.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).