[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] block: Fix too early free in multiwrite
From: |
Christoph Hellwig |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] block: Fix too early free in multiwrite |
Date: |
Fri, 2 Jul 2010 11:38:36 +0200 |
User-agent: |
Mutt/1.3.28i |
On Thu, Jul 01, 2010 at 04:31:57PM +0200, Kevin Wolf wrote:
> bdrv_aio_writev may call the callback immediately (and it will commonly do so
> in error cases). If num_requests doesn't have its final value yet,
> multiwrite_cb will falsely detect that all requests are completed and frees
> the mcb. However, the mcb is still used by other requests that are started
> only
> afterwards. When all requests are completed, it is freed for the second time.
>
> Fix this by setting the right num_requests from the beginning.
Looks good,
Reviewed-by: Christoph Hellwig <address@hidden>