[PATCH 0/2] block/parallels: Fix buffer-based write call

Hanna Reitz posted 2 patches 3 years, 6 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220714132801.72464-1-hreitz@redhat.com
Maintainers: Stefan Hajnoczi <stefanha@redhat.com>, "Denis V. Lunev" <den@openvz.org>, Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>
block/parallels.c          |  4 ++--
tests/qemu-iotests/131     | 35 ++++++++++++++++++++++++++++++++++-
tests/qemu-iotests/131.out | 13 +++++++++++++
3 files changed, 49 insertions(+), 3 deletions(-)
[PATCH 0/2] block/parallels: Fix buffer-based write call
Posted by Hanna Reitz 3 years, 6 months ago
Hi,

While reviewing Stefan\ufffd\ufffd\ufffds libblkio driver series, I\ufffd\ufffd\ufffdve noticed that
block/parallels.c contains a call to bdrv_co_pwritev() that doesn\ufffd\ufffd\ufffdt pass
a QEMUIOVector object but a plain buffer instead.  That seems wrong and
also pretty dangerous, so change it to a bdrv_co_pwrite() call (as I
assume it should be), and add a regression test demonstrating the
problem.


Hanna Reitz (2):
  block/parallels: Fix buffer-based write call
  iotests/131: Add parallels regression test

 block/parallels.c          |  4 ++--
 tests/qemu-iotests/131     | 35 ++++++++++++++++++++++++++++++++++-
 tests/qemu-iotests/131.out | 13 +++++++++++++
 3 files changed, 49 insertions(+), 3 deletions(-)

-- 
2.35.3
Re: [PATCH 0/2] block/parallels: Fix buffer-based write call
Posted by Vladimir Sementsov-Ogievskiy 3 years, 6 months ago
On 7/14/22 16:27, Hanna Reitz wrote:
> Hi,
> 
> While reviewing Stefan’s libblkio driver series, I’ve noticed that
> block/parallels.c contains a call to bdrv_co_pwritev() that doesn’t pass
> a QEMUIOVector object but a plain buffer instead.  That seems wrong and
> also pretty dangerous, so change it to a bdrv_co_pwrite() call (as I
> assume it should be), and add a regression test demonstrating the
> problem.
> 
> 
> Hanna Reitz (2):
>    block/parallels: Fix buffer-based write call
>    iotests/131: Add parallels regression test
> 
>   block/parallels.c          |  4 ++--
>   tests/qemu-iotests/131     | 35 ++++++++++++++++++++++++++++++++++-
>   tests/qemu-iotests/131.out | 13 +++++++++++++
>   3 files changed, 49 insertions(+), 3 deletions(-)
> 

Thanks, applied to my block branch.

-- 
Best regards,
Vladimir