Re: [Qemu-devel] [PATCH 1/2] block: Fix too early free in multiwrite

2010-07-02 Thread Stefan Hajnoczi
On Thu, Jul 1, 2010 at 3:31 PM, Kevin Wolf kw...@redhat.com 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

Re: [Qemu-devel] [PATCH 1/2] block: Fix too early free in multiwrite

2010-07-02 Thread Christoph Hellwig
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.

[Qemu-devel] [PATCH 1/2] block: Fix too early free in multiwrite

2010-07-01 Thread Kevin Wolf
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