public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Ryan Harper <ryanh@us.ibm.com>
To: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Cc: kvm@vger.kernel.org, Leszek Urbanski <tygrys@moo.pl>,
	Michael Tokarev <mjt@tls.msk.ru>, Ryan Harper <ryanh@us.ibm.com>
Subject: Re: [PATCH] block: Free iovec arrays allocated by multiwrite_merge()
Date: Wed, 21 Apr 2010 13:35:36 -0500	[thread overview]
Message-ID: <20100421183536.GG24351@us.ibm.com> (raw)
In-Reply-To: <1271874464-3021-1-git-send-email-stefanha@linux.vnet.ibm.com>

* Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> [2010-04-21 13:27]:
> A new iovec array is allocated when creating a merged write request.
> This patch ensures that the iovec array is deleted in addition to its
> qiov owner.

Nice catch.  Send this to qemu-devel and Avi and merge into qemu-kvm
once it's commited there.

> 
> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
> ---
>  block.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/block.c b/block.c
> index e891544..2d31474 100644
> --- a/block.c
> +++ b/block.c
> @@ -1731,6 +1731,9 @@ static void multiwrite_user_cb(MultiwriteCB *mcb)
> 
>      for (i = 0; i < mcb->num_callbacks; i++) {
>          mcb->callbacks[i].cb(mcb->callbacks[i].opaque, mcb->error);
> +        if (mcb->callbacks[i].free_qiov) {
> +            qemu_iovec_destroy(mcb->callbacks[i].free_qiov);
> +        }
>          qemu_free(mcb->callbacks[i].free_qiov);
>          qemu_vfree(mcb->callbacks[i].free_buf);
>      }
> -- 
> 1.7.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
ryanh@us.ibm.com

  reply	other threads:[~2010-04-21 18:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-20 22:29 Huge memory leak in virtio, see kvm-Bugs-2989366 Leszek Urbanski
2010-04-20 22:51 ` Alexander Graf
2010-04-21  7:53   ` Leszek Urbanski
2010-04-21  8:25     ` Avi Kivity
2010-04-21  1:58 ` Ryan Harper
2010-04-21  6:08   ` Michael Tokarev
2010-04-21 13:29     ` Leszek Urbanski
2010-04-21 18:39       ` Stefan Hajnoczi
2010-04-21 14:32     ` Ryan Harper
2010-04-21 18:27       ` [PATCH] block: Free iovec arrays allocated by multiwrite_merge() Stefan Hajnoczi
2010-04-21 18:35         ` Ryan Harper [this message]
2010-04-21 18:43           ` Brian Jackson
2010-04-21 19:59           ` Leszek Urbanski
2010-04-21 20:03             ` Ryan Harper
2010-04-21 20:13               ` Leszek Urbanski
2010-04-25 12:36                 ` Avi Kivity
2010-04-25 13:27                   ` Stefan Hajnoczi
2010-04-25 13:35                     ` Avi Kivity

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=20100421183536.GG24351@us.ibm.com \
    --to=ryanh@us.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=mjt@tls.msk.ru \
    --cc=stefanha@linux.vnet.ibm.com \
    --cc=tygrys@moo.pl \
    /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