mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-04-01 20:05:19 +00:00
Fix crash on usb-serial hotplug
For domains with no USB address cache, we should not attempt to generate a USB address. https://bugzilla.redhat.com/show_bug.cgi?id=1387665 (cherry picked from commit 00c5386c8622514553c41041312acf0ea86278d7)
This commit is contained in:
parent
91f826810d
commit
5d34d09321
@ -1608,7 +1608,8 @@ qemuDomainAttachChrDeviceAssignAddr(virDomainDefPtr def,
|
||||
goto cleanup;
|
||||
ret = 1;
|
||||
|
||||
} else if (chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL &&
|
||||
} else if (priv->usbaddrs &&
|
||||
chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL &&
|
||||
chr->targetType == VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_USB) {
|
||||
if (virDomainUSBAddressEnsure(priv->usbaddrs, &chr->info) < 0)
|
||||
goto cleanup;
|
||||
|
Loading…
x
Reference in New Issue
Block a user