Re: [libvirt] [PATCH] Fix pool define crash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Cole Robinson <crobinso@xxxxxxxxxx> wrote:
> There's a null dereference in the storage driver when defining a pool.
> Attached patch fixes it for me.
>
> Thanks,
> Cole
> diff --git a/src/storage_driver.c b/src/storage_driver.c
> index 2432a9a..ac5e443 100644
> --- a/src/storage_driver.c
> +++ b/src/storage_driver.c
> @@ -546,7 +546,7 @@ storagePoolDefine(virConnectPtr conn,
>          goto cleanup;
>      def = NULL;
>
> -    if (virStoragePoolObjSaveDef(conn, driver, pool, def) < 0) {
> +    if (virStoragePoolObjSaveDef(conn, driver, pool, pool->def) < 0) {
>          virStoragePoolObjRemove(&driver->pools, pool);
>          goto cleanup;
>      }

Looks right, and passes this test:

  qemud/libvirtd &
  sleep 1
  src/virsh --connect qemu:///session pool-define-as b dir c d e /f j
  src/virsh --connect qemu:///session pool-dumpxml b

Whereas before the patch, running pool-define-as would
cause libvirtd to segfault.

So ACK.

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

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]