[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-2.1 1/2] mirror: Fix qiov size for short req
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH for-2.1 1/2] mirror: Fix qiov size for short requests |
Date: |
Wed, 2 Jul 2014 10:13:44 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Tue, Jul 01, 2014 at 04:52:21PM +0200, Kevin Wolf wrote:
> When mirroring an image of a size that is not a multiple of the
> mirror job granularity, the last request would have the right nb_sectors
> argument, but a qiov that is rounded up to the next multiple of the
> granularity. Don't do this.
>
> This fixes a segfault that is caused by raw-posix being confused by this
> and allocating a buffer with request length, but operating on it with
> qiov length.
>
> Reported-by: Eric Blake <address@hidden>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> block/mirror.c | 4 +++-
> tests/qemu-iotests/041 | 5 +++++
> tests/qemu-iotests/041.out | 4 ++--
> 3 files changed, 10 insertions(+), 3 deletions(-)
Applied Eric's suggestion.
Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block
Stefan
pgph2QwFkRMbZ.pgp
Description: PGP signature