[libvirt PATCH v2] remote: add mutex when freeing private callbacks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This commit resolves illegal memory accesses observed via:

  remoteClientFreePrivateCallbacks()
  remoteClientCloseFunc()
  virNetServerClientCloseLocked()
  virNetServerProcessClients()
  daemonServerProcessClients()
  virHashForEach()
  virNetDaemonRun()
  main()

Signed-off-by: Mike Pontillo <mpontillo@xxxxxxxxxxxxxxxx>
---
 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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux