|
|
a41c76 |
From 163740bff28c6f1a82663bc652f2cd5df39e4276 Mon Sep 17 00:00:00 2001
|
|
|
a41c76 |
Message-Id: <163740bff28c6f1a82663bc652f2cd5df39e4276@dist-git>
|
|
|
edecca |
From: John Ferlan <jferlan@redhat.com>
|
|
|
edecca |
Date: Fri, 25 Jan 2019 12:19:12 -0500
|
|
|
edecca |
Subject: [PATCH] RHEL: qemu: Fix crash trying to use iSCSI hostdev
|
|
|
edecca |
MIME-Version: 1.0
|
|
|
edecca |
Content-Type: text/plain; charset=UTF-8
|
|
|
edecca |
Content-Transfer-Encoding: 8bit
|
|
|
edecca |
|
|
|
edecca |
https://bugzilla.redhat.com/show_bug.cgi?id=1669424
|
|
|
edecca |
https://bugzilla.redhat.com/show_bug.cgi?id=1669966
|
|
|
edecca |
|
|
|
edecca |
RHEL-only
|
|
|
edecca |
|
|
|
edecca |
Commit 861a1a4d2 moved the qemuIsSharedHostdev filter in the
|
|
|
edecca |
HOSTDEV half of the logic to allow calling qemuGetHostdevPath;
|
|
|
edecca |
however, that neglected to check whether the SCSI hostdev was
|
|
|
edecca |
using the iSCSI protocol which has a different overlayed struct
|
|
|
edecca |
format (u.iscsi vs. u.host) resulting in attempted access of
|
|
|
edecca |
u.host when calling virSCSIDeviceGetDevName.
|
|
|
edecca |
|
|
|
edecca |
Signed-off-by: John Ferlan <jferlan@redhat.com>
|
|
|
edecca |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
edecca |
---
|
|
|
edecca |
src/qemu/qemu_conf.c | 4 ++++
|
|
|
edecca |
1 file changed, 4 insertions(+)
|
|
|
edecca |
|
|
|
edecca |
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
|
|
|
a41c76 |
index 0674292fab..3d2f0e7bbb 100644
|
|
|
edecca |
--- a/src/qemu/qemu_conf.c
|
|
|
edecca |
+++ b/src/qemu/qemu_conf.c
|
|
|
a41c76 |
@@ -1844,6 +1844,10 @@ qemuSetUnprivSGIO(virDomainDeviceDefPtr dev)
|
|
|
edecca |
} else if (dev->type == VIR_DOMAIN_DEVICE_HOSTDEV) {
|
|
|
edecca |
hostdev = dev->data.hostdev;
|
|
|
edecca |
|
|
|
edecca |
+ if (hostdev->source.subsys.u.scsi.protocol ==
|
|
|
edecca |
+ VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE_ISCSI)
|
|
|
edecca |
+ return 0;
|
|
|
edecca |
+
|
|
|
edecca |
if (!(hostdev_path = qemuGetHostdevPath(hostdev)))
|
|
|
a41c76 |
return -1;
|
|
|
edecca |
|
|
|
edecca |
--
|
|
|
a41c76 |
2.25.0
|
|
|
edecca |
|