forked from pool/libvirt
d3c3ef874c
- Fix apparmor rules for virt-aa-helper (bsc#1074265) fix-virt-aa-helper-profile.patch - Update upstreamed patches Removed patches: * daemon-close-crasher.patch * lxc-hostname.patch Added patches: * 2089ab21-netserver-close-clients-before-stopping-all-drivers.patch * b475a91b-add-virStringFilterChars-string-utility.patch * faec1958-lxc-set-hostname-based-on-container-name.patch OBS-URL: https://build.opensuse.org/request/show/561313 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=655
46 lines
1.4 KiB
Diff
46 lines
1.4 KiB
Diff
From 2089ab2112e763d6de5888e498afc4fbdc3376db Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= <cbosdonnat@suse.com>
|
|
Date: Wed, 20 Dec 2017 17:36:10 +0100
|
|
Subject: [PATCH] netserver: close clients before stopping all drivers
|
|
|
|
So far clients were closed when disposing the daemon, after the state
|
|
driver cleanup. This was leading to libvirtd crashing at shutdown due
|
|
to missing driver.
|
|
|
|
Moving the client close in virNetServerClose() fixes the problem.
|
|
|
|
Reviewed-by: Erik Skultety <eskultet@redhat.com>
|
|
---
|
|
src/rpc/virnetserver.c | 7 ++++---
|
|
1 file changed, 4 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/src/rpc/virnetserver.c b/src/rpc/virnetserver.c
|
|
index 2b76daab5..43f889e2a 100644
|
|
--- a/src/rpc/virnetserver.c
|
|
+++ b/src/rpc/virnetserver.c
|
|
@@ -774,10 +774,8 @@ void virNetServerDispose(void *obj)
|
|
virObjectUnref(srv->programs[i]);
|
|
VIR_FREE(srv->programs);
|
|
|
|
- for (i = 0; i < srv->nclients; i++) {
|
|
- virNetServerClientClose(srv->clients[i]);
|
|
+ for (i = 0; i < srv->nclients; i++)
|
|
virObjectUnref(srv->clients[i]);
|
|
- }
|
|
VIR_FREE(srv->clients);
|
|
|
|
VIR_FREE(srv->mdnsGroupName);
|
|
@@ -796,6 +794,9 @@ void virNetServerClose(virNetServerPtr srv)
|
|
for (i = 0; i < srv->nservices; i++)
|
|
virNetServerServiceClose(srv->services[i]);
|
|
|
|
+ for (i = 0; i < srv->nclients; i++)
|
|
+ virNetServerClientClose(srv->clients[i]);
|
|
+
|
|
virObjectUnlock(srv);
|
|
}
|
|
|
|
--
|
|
2.15.1
|
|
|