From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Matthew Daley <mattd@bugfuzz.com>
Cc: xen-devel@lists.xenproject.org,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
Ian Campbell <ian.campbell@citrix.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH 1/2] xenstat: fix unsigned less-than-0 comparison
Date: Mon, 5 May 2014 10:32:10 -0400 [thread overview]
Message-ID: <20140505143210.GC3878@phenom.dumpdata.com> (raw)
In-Reply-To: <1399192307-6426-1-git-send-email-mattd@bugfuzz.com>
On Sun, May 04, 2014 at 08:31:46PM +1200, Matthew Daley wrote:
> Commit 1438d36f ("xenstat: Fix buffer over-run with new_domains being
> negative.") attempted to fix the handling of a negative error result
> from xc_domain_getinfolist in xenstat_get_node. However, it forgot to
> change the result variable from an unsigned type to a signed one.
>
> Do so, allowing the error result to be handled properly.
>
> Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
I was looking at this by changing the underlay libxc calls to
using 'unsigned' instead of 'int' but that has kind of been
preempted.
Thanks for fixing it!
> ---
> tools/xenstat/libxenstat/src/xenstat.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/xenstat/libxenstat/src/xenstat.c b/tools/xenstat/libxenstat/src/xenstat.c
> index e5facb8..8072a90 100644
> --- a/tools/xenstat/libxenstat/src/xenstat.c
> +++ b/tools/xenstat/libxenstat/src/xenstat.c
> @@ -164,7 +164,7 @@ xenstat_node *xenstat_get_node(xenstat_handle * handle, unsigned int flags)
> xenstat_node *node;
> xc_physinfo_t physinfo = { 0 };
> xc_domaininfo_t domaininfo[DOMAIN_CHUNK_SIZE];
> - unsigned int new_domains;
> + int new_domains;
> unsigned int i;
>
> /* Create the node */
> --
> 1.9.2
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2014-05-05 14:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-04 8:31 [PATCH 1/2] xenstat: fix unsigned less-than-0 comparison Matthew Daley
2014-05-04 8:31 ` [PATCH 2/2] xenstat: don't leak memory in getBridge Matthew Daley
2014-05-05 14:32 ` Konrad Rzeszutek Wilk [this message]
2014-05-08 10:39 ` [PATCH 1/2] xenstat: fix unsigned less-than-0 comparison 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=20140505143210.GC3878@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=mattd@bugfuzz.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
--cc=xen-devel@lists.xenproject.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).