[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-1.4] migration: restrict scope of incoming f
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH for-1.4] migration: restrict scope of incoming fd read handler |
Date: |
Mon, 11 Feb 2013 17:09:40 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 |
Am 11.02.2013 17:01, schrieb Stefan Hajnoczi:
> The incoming migration is processed in a coroutine and uses an fd read
> handler to enter the yielded coroutine when data becomes available.
>
> The read handler was set too broadly, so that spurious coroutine entries
> were be triggered if other coroutine users yielded (like the block
> layer's bdrv_write() function).
>
> Install the fd read only only when yielding for more data to become
> available. This prevents spurious coroutine entries which break code
> that assumes only a specific set of places can re-enter the coroutine.
>
> This patch fixes crashes in block/raw-posix.c that are triggered with
> "migrate -b" when qiov becomes a dangling pointer due to a spurious
> coroutine entry that frees qiov early.
>
> Signed-off-by: Stefan Hajnoczi <address@hidden>
> ---
> Note: this patch replaces "[PATCH for-1.4 stable] block: handle spurious
> coroutine entries". It's an alternative fix that I hope Kevin will like more.
Yes, this looks much better to me.
Kevin