From: Keir Fraser <keir.xen@gmail.com>
To: Jan Beulich <JBeulich@suse.com>, Tim Deegan <tim@xen.org>
Cc: xen-devel@lists.xen.org
Subject: Re: [PATCH] xen/xenoprof: avoid division by 0
Date: Fri, 15 Feb 2013 08:24:15 +0000 [thread overview]
Message-ID: <CD43A12F.4BF6F%keir.xen@gmail.com> (raw)
In-Reply-To: <511DFB6F02000078000BE94E@nat28.tlf.novell.com>
On 15/02/2013 08:10, "Jan Beulich" <JBeulich@suse.com> wrote:
>>>> On 14.02.13 at 18:10, Tim Deegan <tim@xen.org> wrote:
>> # HG changeset patch
>> # Parent 5a84cc531072378e6e5ff89b4c0e9a35000dc56f
>> xen/xenoprof: avoid division by 0.
>>
>> Signed-off-by: Tim Deegan <tim@xen.org>
>
> Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
>> diff -r 5a84cc531072 xen/common/xenoprof.c
>> --- a/xen/common/xenoprof.c Thu Feb 14 15:46:56 2013 +0000
>> +++ b/xen/common/xenoprof.c Thu Feb 14 17:07:41 2013 +0000
>> @@ -193,6 +193,13 @@ static int alloc_xenoprof_struct(
>> unsigned max_max_samples;
>> int i;
>>
>> + nvcpu = 0;
>> + for_each_vcpu ( d, v )
>> + nvcpu++;
>> +
>> + if ( !nvcpu )
>> + return -EINVAL;
>> +
>> d->xenoprof = xzalloc(struct xenoprof);
>> if ( d->xenoprof == NULL )
>> {
>> @@ -209,10 +216,6 @@ static int alloc_xenoprof_struct(
>> return -ENOMEM;
>> }
>>
>> - nvcpu = 0;
>> - for_each_vcpu ( d, v )
>> - nvcpu++;
>> -
>> bufsize = sizeof(struct xenoprof_buf);
>> i = sizeof(struct event_log);
>> #ifdef CONFIG_COMPAT
>
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
prev parent reply other threads:[~2013-02-15 8:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-14 16:16 [PATCH] xen/xenoprof: avoid division by 0 Tim Deegan
2013-02-14 16:34 ` Jan Beulich
2013-02-14 16:50 ` Tim Deegan
2013-02-14 17:05 ` Jan Beulich
2013-02-14 17:10 ` Tim Deegan
2013-02-15 8:10 ` Jan Beulich
2013-02-15 8:24 ` Keir Fraser [this message]
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=CD43A12F.4BF6F%keir.xen@gmail.com \
--to=keir.xen@gmail.com \
--cc=JBeulich@suse.com \
--cc=tim@xen.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.