[libvirt] [PATCH 0/9] Cleanup virConnectPtr usage

Michal Privoznik posted 9 patches 4 years, 4 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1575453026.git.mprivozn@redhat.com
src/libxl/libxl_driver.c            |  71 ++++------
src/lxc/lxc_driver.c                |  12 +-
src/lxc/lxc_process.c               |  40 +++---
src/lxc/lxc_process.h               |   2 +-
src/qemu/qemu_driver.c              | 193 ++++++++++++----------------
src/remote/remote_daemon_dispatch.c |   3 -
6 files changed, 139 insertions(+), 182 deletions(-)
[libvirt] [PATCH 0/9] Cleanup virConnectPtr usage
Posted by Michal Privoznik 4 years, 4 months ago
I've noticed this problem when reviewing a patch on the list [1].

Long story short, dom->conn is not guaranteed to have all driver
pointers set (consider split daemons). I haven't identified any
other violation than what I'm fixing here. But something might have
slipped through my git grep.

1: https://www.redhat.com/archives/libvir-list/2019-December/msg00120.html

Michal Prívozník (9):
  qemu_driver: Push qemuDomainInterfaceAddresses() a few lines down
  qemu: Don't use dom->conn to lookup virNetwork
  qemuGetDHCPInterfaces: Move some variables inside the loop
  qemuGetDHCPInterfaces: Switch to GLib
  libxl: Don't use dom->conn to lookup virNetwork
  libxlGetDHCPInterfaces: Move some variables inside the loop
  libxlGetDHCPInterfaces: Switch to GLib
  lxc: Cleanup virConnectPtr usage
  get_nonnull_domain: Drop useless comment

 src/libxl/libxl_driver.c            |  71 ++++------
 src/lxc/lxc_driver.c                |  12 +-
 src/lxc/lxc_process.c               |  40 +++---
 src/lxc/lxc_process.h               |   2 +-
 src/qemu/qemu_driver.c              | 193 ++++++++++++----------------
 src/remote/remote_daemon_dispatch.c |   3 -
 6 files changed, 139 insertions(+), 182 deletions(-)

-- 
2.23.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 0/9] Cleanup virConnectPtr usage
Posted by Cole Robinson 4 years, 4 months ago
On 12/4/19 4:55 AM, Michal Privoznik wrote:
> I've noticed this problem when reviewing a patch on the list [1].
> 
> Long story short, dom->conn is not guaranteed to have all driver
> pointers set (consider split daemons). I haven't identified any
> other violation than what I'm fixing here. But something might have
> slipped through my git grep.
> 
> 1: https://www.redhat.com/archives/libvir-list/2019-December/msg00120.html
> 
> Michal Prívozník (9):
>   qemu_driver: Push qemuDomainInterfaceAddresses() a few lines down
>   qemu: Don't use dom->conn to lookup virNetwork
>   qemuGetDHCPInterfaces: Move some variables inside the loop
>   qemuGetDHCPInterfaces: Switch to GLib
>   libxl: Don't use dom->conn to lookup virNetwork
>   libxlGetDHCPInterfaces: Move some variables inside the loop
>   libxlGetDHCPInterfaces: Switch to GLib
>   lxc: Cleanup virConnectPtr usage
>   get_nonnull_domain: Drop useless comment
> 
>  src/libxl/libxl_driver.c            |  71 ++++------
>  src/lxc/lxc_driver.c                |  12 +-
>  src/lxc/lxc_process.c               |  40 +++---
>  src/lxc/lxc_process.h               |   2 +-
>  src/qemu/qemu_driver.c              | 193 ++++++++++++----------------
>  src/remote/remote_daemon_dispatch.c |   3 -
>  6 files changed, 139 insertions(+), 182 deletions(-)
> 

Reviewed-by: Cole Robinson <crobinso@redhat.com>

- Cole

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