提交 99f00fb8 编写于 作者: P Pavel Hrdina

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: NPavel Hrdina <phrdina@redhat.com>
上级 c6d2fba6
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册