Blame SOURCES/gvfs-1.22.5-proxy-volume-monitor-Guard-access-to-the-internal-ca.patch

9e08f4
From a83afca5d2f10d46712f75d53690bd029f0aebef Mon Sep 17 00:00:00 2001
9e08f4
From: Debarshi Ray <debarshir@gnome.org>
9e08f4
Date: Wed, 30 Sep 2015 12:38:55 +0200
9e08f4
Subject: [PATCH] proxy volume monitor: Guard access to the internal caches
9e08f4
9e08f4
Accesses to the drives, volumes and mounts hash tables should be
9e08f4
guarded by the proxy_vm mutex.
9e08f4
9e08f4
https://bugzilla.gnome.org/show_bug.cgi?id=755805
9e08f4
---
9e08f4
 monitor/proxy/gproxyvolumemonitor.c | 8 ++++++++
9e08f4
 1 file changed, 8 insertions(+)
9e08f4
9e08f4
diff --git a/monitor/proxy/gproxyvolumemonitor.c b/monitor/proxy/gproxyvolumemonitor.c
9e08f4
index 7f05b398fc06..b05b8c7a30ce 100644
9e08f4
--- a/monitor/proxy/gproxyvolumemonitor.c
9e08f4
+++ b/monitor/proxy/gproxyvolumemonitor.c
9e08f4
@@ -864,6 +864,8 @@ name_owner_appeared (GProxyVolumeMonitor *monitor)
9e08f4
   GProxyVolume *volume;
9e08f4
   GProxyMount *mount;
9e08f4
 
9e08f4
+  G_LOCK (proxy_vm);
9e08f4
+
9e08f4
   seed_monitor (monitor);
9e08f4
 
9e08f4
   /* emit signals for all the drives/volumes/mounts "added" */
9e08f4
@@ -878,6 +880,8 @@ name_owner_appeared (GProxyVolumeMonitor *monitor)
9e08f4
   g_hash_table_iter_init (&hash_iter, monitor->mounts);
9e08f4
   while (g_hash_table_iter_next (&hash_iter, NULL, (gpointer) &mount))
9e08f4
     signal_emit_in_idle (monitor, "mount-added", mount);
9e08f4
+
9e08f4
+  G_UNLOCK (proxy_vm);
9e08f4
 }
9e08f4
 
9e08f4
 static void
9e08f4
@@ -888,6 +892,8 @@ name_owner_vanished (GProxyVolumeMonitor *monitor)
9e08f4
   GProxyVolume *volume;
9e08f4
   GProxyMount *mount;
9e08f4
 
9e08f4
+  G_LOCK (proxy_vm);
9e08f4
+
9e08f4
   g_hash_table_iter_init (&hash_iter, monitor->mounts);
9e08f4
   while (g_hash_table_iter_next (&hash_iter, NULL, (gpointer) &mount))
9e08f4
     {
9e08f4
@@ -911,6 +917,8 @@ name_owner_vanished (GProxyVolumeMonitor *monitor)
9e08f4
       signal_emit_in_idle (monitor, "drive-disconnected", drive);
9e08f4
     }
9e08f4
   g_hash_table_remove_all (monitor->drives);
9e08f4
+
9e08f4
+  G_UNLOCK (proxy_vm);
9e08f4
 }
9e08f4
 
9e08f4
 static void
9e08f4
-- 
9e08f4
2.1.0
9e08f4