提交 71e4d4a2 编写于 作者: M Marc Hartmayer 提交者: John Ferlan

daemon: Raise an error if 'max_workers' < 1 in libvirtd.conf

Hypervisor drivers (e.g. QEMU) assume that they run in a separate
thread from the main event loop thread otherwise deadlocks can
occur. Therefore let's report an error if max_workers < 1 is set in
the libvirtd configuration file.
Signed-off-by: NMarc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: NBoris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: NBjoern Walk <bwalk@linux.ibm.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
上级 46d258d1
......@@ -337,6 +337,11 @@ daemonConfigLoadOptions(struct daemonConfig *data,
goto error;
if (virConfGetValueUInt(conf, "max_workers", &data->max_workers) < 0)
goto error;
if (data->max_workers < 1) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("'max_workers' must be greater than 0"));
goto error;
}
if (virConfGetValueUInt(conf, "max_clients", &data->max_clients) < 0)
goto error;
if (virConfGetValueUInt(conf, "max_queued_clients", &data->max_queued_clients) < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册