libvirt/86cae503-rpc-fix-pre-exec.patch
James Fehlig a026aabb02 Accepting request 586966 from home:jfehlig:branches:Virtualization
- qemu: avoid denial of service reading from QEMU guest agent
  CVE-2018-1064
  fbf31e1a-CVE-2018-1064.patch
  bsc#1083625

- virtlockd: fix loosing lock on re-exec
  464889ff-rpc-aquire-ref-dispatch.patch,
  c6f1d519-rpc-simplify-dispatch.patch,
  06e7ebb6-rpc-invoke-dispatch-unlocked.patch,
  86cae503-rpc-fix-pre-exec.patch,
  eefabb38-rpc-virtlockd-virtlogd-single-thread.patch
  bsc#1076861

- libvirtd: fix potential deadlock when reloading
  33c6eb96-fix-libvirtd-reload-deadlock.patch
  bsc#1079150

OBS-URL: https://build.opensuse.org/request/show/586966
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=676
2018-03-14 14:29:10 +00:00

41 lines
1.9 KiB
Diff

commit 86cae503a4404e068a11285564a0ee3862d1570c
Author: Daniel P. Berrangé <berrange@redhat.com>
Date: Tue Mar 6 17:56:57 2018 +0000
rpc: avoid crashing in pre-exec if no workers are present
If max_workers is set to zero, then the worker thread pool won't be
created, so when serializing state for pre-exec we must set various
parameters to zero.
Reviewed-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Index: libvirt-4.1.0/src/rpc/virnetserver.c
===================================================================
--- libvirt-4.1.0.orig/src/rpc/virnetserver.c
+++ libvirt-4.1.0/src/rpc/virnetserver.c
@@ -580,18 +580,21 @@ virJSONValuePtr virNetServerPreExecResta
goto error;
if (virJSONValueObjectAppendNumberUint(object, "min_workers",
+ srv->workers == NULL ? 0 :
virThreadPoolGetMinWorkers(srv->workers)) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Cannot set min_workers data in JSON document"));
goto error;
}
if (virJSONValueObjectAppendNumberUint(object, "max_workers",
+ srv->workers == NULL ? 0 :
virThreadPoolGetMaxWorkers(srv->workers)) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Cannot set max_workers data in JSON document"));
goto error;
}
if (virJSONValueObjectAppendNumberUint(object, "priority_workers",
+ srv->workers == NULL ? 0 :
virThreadPoolGetPriorityWorkers(srv->workers)) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Cannot set priority_workers data in JSON document"));