qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: mrhines@linux.vnet.ibm.com
Cc: aliguori@us.ibm.com, quintela@redhat.com, qemu-devel@nongnu.org,
	owasserm@redhat.com, abali@us.ibm.com, mrhines@us.ibm.com,
	gokul@us.ibm.com, pbonzini@redhat.com, chegu_vinod@hp.com,
	knoel@redhat.com
Subject: Re: [Qemu-devel] [PATCH v3 resend/cleanup 2/8] rdma: bugfix: ram_control_save_page()
Date: Fri, 12 Jul 2013 11:09:48 -0600	[thread overview]
Message-ID: <51E0385C.1000805@redhat.com> (raw)
In-Reply-To: <1373640028-5138-3-git-send-email-mrhines@linux.vnet.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 1053 bytes --]

On 07/12/2013 08:40 AM, mrhines@linux.vnet.ibm.com wrote:
> From: "Michael R. Hines" <mrhines@us.ibm.com>
> 
> We were not checking for a valid 'bytes_sent' pointer before accessing it.
> 
> Signed-off-by: Michael R. Hines <mrhines@us.ibm.com>
> ---
>  savevm.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Eric Blake <eblake@redhat.com>

> 
> diff --git a/savevm.c b/savevm.c
> index e0491e7..03fc4d9 100644
> --- a/savevm.c
> +++ b/savevm.c
> @@ -662,7 +662,7 @@ size_t ram_control_save_page(QEMUFile *f, ram_addr_t block_offset,
>                                      offset, size, bytes_sent);
>  
>          if (ret != RAM_SAVE_CONTROL_DELAYED) {
> -            if (*bytes_sent > 0) {
> +            if (bytes_sent && *bytes_sent > 0) {
>                  qemu_update_position(f, *bytes_sent);
>              } else if (ret < 0) {
>                  qemu_file_set_error(f, ret);
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]

  reply	other threads:[~2013-07-12 17:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-12 14:40 [Qemu-devel] [PATCH v3 resend/cleanup 0/8] rdma: core logic mrhines
2013-07-12 14:40 ` [Qemu-devel] [PATCH v3 resend/cleanup 1/8] rdma: update documentation to reflect new unpin support mrhines
2013-07-12 17:09   ` Eric Blake
2013-07-12 17:26     ` Michael R. Hines
2013-07-12 17:39       ` Eric Blake
2013-07-12 17:46         ` Michael R. Hines
2013-07-12 14:40 ` [Qemu-devel] [PATCH v3 resend/cleanup 2/8] rdma: bugfix: ram_control_save_page() mrhines
2013-07-12 17:09   ` Eric Blake [this message]
2013-07-12 14:40 ` [Qemu-devel] [PATCH v3 resend/cleanup 3/8] rdma: introduce ram_handle_compressed() mrhines
2013-07-12 14:40 ` [Qemu-devel] [PATCH v3 resend/cleanup 4/8] rdma: core logic mrhines
2013-07-12 14:40 ` [Qemu-devel] [PATCH v3 resend/cleanup 5/8] rdma: send pc.ram mrhines
2013-07-12 14:40 ` [Qemu-devel] [PATCH v3 resend/cleanup 6/8] rdma: allow state transitions between other states besides ACTIVE mrhines
2013-07-12 14:40 ` [Qemu-devel] [PATCH v3 resend/cleanup 7/8] rdma: introduce MIG_STATE_NONE and change MIG_STATE_SETUP state transition mrhines
2013-07-12 14:40 ` [Qemu-devel] [PATCH v3 resend/cleanup 8/8] rdma: account for the time spent in MIG_STATE_SETUP through QMP mrhines

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=51E0385C.1000805@redhat.com \
    --to=eblake@redhat.com \
    --cc=abali@us.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=chegu_vinod@hp.com \
    --cc=gokul@us.ibm.com \
    --cc=knoel@redhat.com \
    --cc=mrhines@linux.vnet.ibm.com \
    --cc=mrhines@us.ibm.com \
    --cc=owasserm@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.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).