From: Eric Blake <eblake@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Cc: stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH for-2.1 1/2] mirror: Fix qiov size for short requests
Date: Tue, 01 Jul 2014 15:31:55 -0600 [thread overview]
Message-ID: <53B328CB.1080405@redhat.com> (raw)
In-Reply-To: <53B2E76A.9000704@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1333 bytes --]
On 07/01/2014 10:52 AM, Eric Blake wrote:
> On 07/01/2014 08:52 AM, 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 <eblake@redhat.com>
>> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
>> ---
>> block/mirror.c | 4 +++-
>> tests/qemu-iotests/041 | 5 +++++
>> tests/qemu-iotests/041.out | 4 ++--
>> 3 files changed, 10 insertions(+), 3 deletions(-)
>>
>
>> +++ b/tests/qemu-iotests/041
>> @@ -219,6 +219,11 @@ class TestSingleDriveZeroLength(TestSingleDrive):
>> test_small_buffer2 = None
>> test_large_cluster = None
>>
>> +class TestSingleDriverUnalignedLength(TestSingleDrive):
>
> s/Driver/Drive/ for consistency in the class name?
>
Other than that:
Tested-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2014-07-01 21:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-01 14:52 [Qemu-devel] [PATCH for-2.1 0/2] Fix mirror segfault with unaligned size Kevin Wolf
2014-07-01 14:52 ` [Qemu-devel] [PATCH for-2.1 1/2] mirror: Fix qiov size for short requests Kevin Wolf
2014-07-01 16:52 ` Eric Blake
2014-07-01 21:31 ` Eric Blake [this message]
2014-07-02 8:50 ` Kevin Wolf
2014-07-02 8:13 ` Stefan Hajnoczi
2014-07-01 14:52 ` [Qemu-devel] [PATCH for-2.1 2/2] block: Assert qiov length matches request length Kevin Wolf
2014-07-01 15:16 ` Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53B328CB.1080405@redhat.com \
--to=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.