mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 01:45:17 +00:00
qemu_driver: check whether iothread is used by controller
This follows the same check for disk, because we cannot remove iothread if it's used by disk or by controller. It could lead to crashing QEMU. Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
c6d2fba69c
commit
99f00fb8bc
@ -5749,6 +5749,16 @@ qemuDomainDelIOThreadCheck(virDomainDefPtr def,
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < def->ncontrollers; i++) {
|
||||
if (def->controllers[i]->iothread == iothread_id) {
|
||||
virReportError(VIR_ERR_INVALID_ARG,
|
||||
_("cannot remove IOThread '%u' since it "
|
||||
"is being used by controller"),
|
||||
iothread_id);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user