From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: "Mrzyglod, DanielX T" <danielx.t.mrzyglod@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] eal: fix resource leak
Date: Mon, 11 Apr 2016 10:25:49 +0000 [thread overview]
Message-ID: <C6ECDF3AB251BE4894318F4E45123697820FB5ED@IRSMSX109.ger.corp.intel.com> (raw)
In-Reply-To: <1460368014-9012-1-git-send-email-danielx.t.mrzyglod@intel.com>
> Subject: [PATCH] eal: fix resource leak
>
> CID 13289 (#1-2 of 2): Resource leak (RESOURCE_LEAK):
> The system resource will not be reclaimed and reused, reducing the future
> availability of the resource.
> In pci_vfio_get_group_fd: Leak of memory or pointers to system resources
>
> Fixes: ff0b67d1c868 ("vfio: DMA mapping")
>
> Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
> ---
> lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c
> b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c
> index fdfdeb4..10266f8 100644
> --- a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c
> +++ b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c
> @@ -535,6 +535,7 @@ pci_vfio_get_group_fd(int iommu_group_no)
> /* if the fd is valid, create a new group for it */
> if (vfio_cfg.vfio_group_idx == VFIO_MAX_GROUPS) {
> RTE_LOG(ERR, EAL, "Maximum number of VFIO
> groups reached!\n");
> + close(vfio_group_fd);
> return -1;
> }
> vfio_cfg.vfio_groups[vfio_cfg.vfio_group_idx].group_no =
> iommu_group_no;
> --
> 2.5.5
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
next prev parent reply other threads:[~2016-04-11 10:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-11 9:46 Daniel Mrzyglod
2016-04-11 10:25 ` Burakov, Anatoly [this message]
2016-04-11 12:36 ` Thomas Monjalon
2017-09-19 13:34 Daniel Mrzyglod
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=C6ECDF3AB251BE4894318F4E45123697820FB5ED@IRSMSX109.ger.corp.intel.com \
--to=anatoly.burakov@intel.com \
--cc=danielx.t.mrzyglod@intel.com \
--cc=dev@dpdk.org \
/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).