[libvirt] [PATCH] qemu: hotplug: Fix TLS setup on disk hotplug

Peter Krempa posted 1 patch 5 years, 10 months ago
Failed in applying to current master (apply log)
src/qemu/qemu_hotplug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt] [PATCH] qemu: hotplug: Fix TLS setup on disk hotplug
Posted by Peter Krempa 5 years, 10 months ago
We need to check if TLS is enabled as the variable is a tristate.
Currently we'd setup TLS even if it was explicitly turned off.
Thankfully TLS for disks was only used with the vxhs protocol so hardly
anybody would ever be able to hit the problem.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---

This applies on top of my branch collecting all ACKed postings of
recent blockdev-related work. Current version can be fetched by:

git fetch git://pipo.sk/pipo/libvirt.git blockdev-staging


 src/qemu/qemu_hotplug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 2f76c048aa..2b0d5df3bf 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -468,7 +468,7 @@ qemuDomainAttachDiskGeneric(virQEMUDriverPtr driver,
     else if (rv > 0)
         prdStarted = true;

-    if (disk->src->haveTLS &&
+    if (disk->src->haveTLS == VIR_TRISTATE_BOOL_YES &&
         qemuDomainAddDiskSrcTLSObject(driver, vm, disk->src) < 0)
         goto error;

-- 
2.16.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemu: hotplug: Fix TLS setup on disk hotplug
Posted by Jiri Denemark 5 years, 10 months ago
On Fri, Jun 01, 2018 at 17:23:24 +0200, Peter Krempa wrote:
> We need to check if TLS is enabled as the variable is a tristate.
> Currently we'd setup TLS even if it was explicitly turned off.
> Thankfully TLS for disks was only used with the vxhs protocol so hardly
> anybody would ever be able to hit the problem.
> 
> Signed-off-by: Peter Krempa <pkrempa@redhat.com>
> ---
> 
> This applies on top of my branch collecting all ACKed postings of
> recent blockdev-related work. Current version can be fetched by:
> 
> git fetch git://pipo.sk/pipo/libvirt.git blockdev-staging
> 
> 
>  src/qemu/qemu_hotplug.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>

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