Re: [PATCH] block: Free iovec arrays allocated by multiwrite_merge()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Stefan Hajnoczi <stefanha@xxxxxxxxxxxxxxxxxx> [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@xxxxxxxxxxxxxxxxxx>
> ---
>  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@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
ryanh@xxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux