On Tue, Mar 07, 2023 at 05:57:56PM +0000, Mike Pontillo wrote:
This commit resolves illegal memory accesses observed via:
remoteClientFreePrivateCallbacks()
remoteClientCloseFunc()
virNetServerClientCloseLocked()
virNetServerProcessClients()
daemonServerProcessClients()
virHashForEach()
virNetDaemonRun()
main()
Signed-off-by: Mike Pontillo <mpontillo(a)digitalocean.com>
Reviewed-by: Martin Kletzander <mkletzan(a)redhat.com>
Thanks for the patch and congratulation on your first upstream libvirt
commit contribution ;)
---
src/remote/remote_daemon_dispatch.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c
index 250eb51e6b..0d843d63f6 100644
--- a/src/remote/remote_daemon_dispatch.c
+++ b/src/remote/remote_daemon_dispatch.c
@@ -1709,6 +1709,8 @@ static void
remoteClientFreePrivateCallbacks(struct daemonClientPrivate *priv)
{
g_autoptr(virIdentity) sysident = virIdentityGetSystem();
+ VIR_LOCK_GUARD lock = virLockGuardLock(&priv->lock);
+
virIdentitySetCurrent(sysident);
DEREG_CB(priv->conn, priv->domainEventCallbacks,
--
2.34.1