[libvirt] [PATCH 0/4] qemu: fix usage of disk and storage source private data

Peter Krempa posted 4 patches 6 years, 4 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1510229931.git.pkrempa@redhat.com
src/qemu/qemu_command.c       | 18 ++++++++++++++----
src/qemu/qemu_domain.c        | 14 ++++++++------
src/qemu/qemu_hotplug.c       | 17 ++++++++++++-----
src/qemu/qemu_parse_command.c |  4 +---
src/qemu/qemu_process.c       | 14 +++++++++-----
5 files changed, 44 insertions(+), 23 deletions(-)
[libvirt] [PATCH 0/4] qemu: fix usage of disk and storage source private data
Posted by Peter Krempa 6 years, 4 months ago
There were a few cases where we'd use private data for a storage source
which was not allocated. Fix it by checking whether it is allocated.

Qemu command line parser allocated disk definition via VIR_ALLOC rather
than the proper function. This resulted into the disk private data
strucutre not being allocated. That one is required.

Peter Krempa (4):
  qemu: parse: Allocate disk definition with private data
  qemu: Tolerate storage source private data being NULL
  qemu: domain: Don't allocate storage source private data if not needed
  qemu: process: Setup disk secrets when preparing disks

 src/qemu/qemu_command.c       | 18 ++++++++++++++----
 src/qemu/qemu_domain.c        | 14 ++++++++------
 src/qemu/qemu_hotplug.c       | 17 ++++++++++++-----
 src/qemu/qemu_parse_command.c |  4 +---
 src/qemu/qemu_process.c       | 14 +++++++++-----
 5 files changed, 44 insertions(+), 23 deletions(-)

-- 
2.14.3

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 0/4] qemu: fix usage of disk and storage source private data
Posted by John Ferlan 6 years, 4 months ago

On 11/09/2017 07:20 AM, Peter Krempa wrote:
> There were a few cases where we'd use private data for a storage source
> which was not allocated. Fix it by checking whether it is allocated.
> 
> Qemu command line parser allocated disk definition via VIR_ALLOC rather
> than the proper function. This resulted into the disk private data
> strucutre not being allocated. That one is required.
> 
> Peter Krempa (4):
>   qemu: parse: Allocate disk definition with private data
>   qemu: Tolerate storage source private data being NULL
>   qemu: domain: Don't allocate storage source private data if not needed
>   qemu: process: Setup disk secrets when preparing disks
> 
>  src/qemu/qemu_command.c       | 18 ++++++++++++++----
>  src/qemu/qemu_domain.c        | 14 ++++++++------
>  src/qemu/qemu_hotplug.c       | 17 ++++++++++++-----
>  src/qemu/qemu_parse_command.c |  4 +---
>  src/qemu/qemu_process.c       | 14 +++++++++-----
>  5 files changed, 44 insertions(+), 23 deletions(-)
> 

with the edit in patch 4 handled...

Reviewed-by: John Ferlan <jferlan@redhat.com>
(series)

John

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list