From: Wei Liu <wei.liu2@citrix.com>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: wei.liu2@citrix.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org
Subject: Re: [PATCH 1/2] xenmon: close qos_fd when finished with it in alloc_qos_data
Date: Thu, 11 Feb 2016 11:18:28 +0000 [thread overview]
Message-ID: <20160211111828.GD17384@citrix.com> (raw)
In-Reply-To: <1455121585-22659-1-git-send-email-ian.campbell@citrix.com>
On Wed, Feb 10, 2016 at 04:26:24PM +0000, Ian Campbell wrote:
> Otherwise the fd is leaked. NB the mmap'd memory in the global
> cpu_qos_data[n] is not affected by closing the underlying fd.
>
> Compile tested only.
>
> CID: 1055930
>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
> ---
> tools/xenmon/xenbaked.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/xenmon/xenbaked.c b/tools/xenmon/xenbaked.c
> index eacacb0..782f0c1 100644
> --- a/tools/xenmon/xenbaked.c
> +++ b/tools/xenmon/xenbaked.c
> @@ -689,6 +689,7 @@ static void alloc_qos_data(int ncpu)
> cpu_qos_data[n] = new_qos;
> }
> free(dummy);
> + close(qos_fd);
> new_qos = NULL;
> }
>
> --
> 2.1.4
>
next prev parent reply other threads:[~2016-02-11 11:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-10 16:26 [PATCH 1/2] xenmon: close qos_fd when finished with it in alloc_qos_data Ian Campbell
2016-02-10 16:26 ` [PATCH 2/2] xenmon: initialise dummy array Ian Campbell
2016-02-11 11:19 ` Wei Liu
2016-02-11 11:18 ` Wei Liu [this message]
2016-02-11 15:38 ` [PATCH 1/2] xenmon: close qos_fd when finished with it in alloc_qos_data Ian Campbell
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=20160211111828.GD17384@citrix.com \
--to=wei.liu2@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=xen-devel@lists.xen.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).