[PATCH 0/3] qemu: fix off-by-one memory allocation

Peter Krempa posted 3 patches 4 years, 1 month ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1584457464.git.pkrempa@redhat.com
src/qemu/qemu_block.c                         |  4 +-
.../bitmap/snapshots-synthetic-broken.json    | 18 ++++++++
.../bitmap/snapshots-synthetic-broken.out     |  2 +
.../snapshots-synthetic-broken-1-2            | 30 ++++++++++++
.../snapshots-synthetic-broken-1-3            | 46 +++++++++++++++++++
.../snapshots-synthetic-broken-1-4            | 46 +++++++++++++++++++
.../snapshots-synthetic-broken-1-5            | 46 +++++++++++++++++++
.../snapshots-synthetic-broken-2-3            | 46 +++++++++++++++++++
.../snapshots-synthetic-broken-2-4            | 46 +++++++++++++++++++
.../snapshots-synthetic-broken-2-5            | 46 +++++++++++++++++++
10 files changed, 328 insertions(+), 2 deletions(-)
[PATCH 0/3] qemu: fix off-by-one memory allocation
Posted by Peter Krempa 4 years, 1 month ago
String list was allocated without extra element.

Peter Krempa (3):
  qemuBlockBitmapsHandleCommitStart: Fix allocation of string list
  qemuBlockBitmapsHandleCommitFinish: Use proper variable to iterate
  qemublocktest: Add tests for re-enabling of bitmaps after commit

 src/qemu/qemu_block.c                         |  4 +-
 .../bitmap/snapshots-synthetic-broken.json    | 18 ++++++++
 .../bitmap/snapshots-synthetic-broken.out     |  2 +
 .../snapshots-synthetic-broken-1-2            | 30 ++++++++++++
 .../snapshots-synthetic-broken-1-3            | 46 +++++++++++++++++++
 .../snapshots-synthetic-broken-1-4            | 46 +++++++++++++++++++
 .../snapshots-synthetic-broken-1-5            | 46 +++++++++++++++++++
 .../snapshots-synthetic-broken-2-3            | 46 +++++++++++++++++++
 .../snapshots-synthetic-broken-2-4            | 46 +++++++++++++++++++
 .../snapshots-synthetic-broken-2-5            | 46 +++++++++++++++++++
 10 files changed, 328 insertions(+), 2 deletions(-)

-- 
2.24.1

Re: [PATCH 0/3] qemu: fix off-by-one memory allocation
Posted by Daniel P. Berrangé 4 years, 1 month ago
On Tue, Mar 17, 2020 at 04:05:12PM +0100, Peter Krempa wrote:
> String list was allocated without extra element.
> 
> Peter Krempa (3):
>   qemuBlockBitmapsHandleCommitStart: Fix allocation of string list
>   qemuBlockBitmapsHandleCommitFinish: Use proper variable to iterate
>   qemublocktest: Add tests for re-enabling of bitmaps after commit

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Tested-by: Daniel P. Berrangé <berrange@redhat.com>

this fixes the freebsd crashes our CI saw.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

Re: [PATCH 0/3] qemu: fix off-by-one memory allocation
Posted by Ján Tomko 4 years, 1 month ago
On a Tuesday in 2020, Peter Krempa wrote:
>String list was allocated without extra element.
>
>Peter Krempa (3):
>  qemuBlockBitmapsHandleCommitStart: Fix allocation of string list
>  qemuBlockBitmapsHandleCommitFinish: Use proper variable to iterate
>  qemublocktest: Add tests for re-enabling of bitmaps after commit
>
> src/qemu/qemu_block.c                         |  4 +-
> .../bitmap/snapshots-synthetic-broken.json    | 18 ++++++++
> .../bitmap/snapshots-synthetic-broken.out     |  2 +
> .../snapshots-synthetic-broken-1-2            | 30 ++++++++++++
> .../snapshots-synthetic-broken-1-3            | 46 +++++++++++++++++++
> .../snapshots-synthetic-broken-1-4            | 46 +++++++++++++++++++
> .../snapshots-synthetic-broken-1-5            | 46 +++++++++++++++++++
> .../snapshots-synthetic-broken-2-3            | 46 +++++++++++++++++++
> .../snapshots-synthetic-broken-2-4            | 46 +++++++++++++++++++
> .../snapshots-synthetic-broken-2-5            | 46 +++++++++++++++++++
> 10 files changed, 328 insertions(+), 2 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano