]> xenbits.xensource.com Git - libvirt.git/commitdiff
node_device_udev: Take lock if `driver->privateData` is modified
authorMarc Hartmayer <mhartmay@linux.ibm.com>
Tue, 23 Apr 2024 18:08:54 +0000 (20:08 +0200)
committerJonathon Jongsma <jjongsma@redhat.com>
Tue, 18 Jun 2024 14:00:19 +0000 (09:00 -0500)
Since @driver->privateData is modified take the lock.

Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
src/node_device/node_device_udev.c

index 29d2a7677b768c398b618d404a507009bbc3bcc4..7329e5ef17d57f7d90b3c6a9b3a1659fb4f33bb2 100644 (file)
@@ -2232,7 +2232,9 @@ mdevctlEventHandleCallback(GFileMonitor *monitor G_GNUC_UNUSED,
      * configuration change, try to coalesce these changes by waiting for the
      * CHANGES_DONE_HINT event. As a fallback,  add a timeout to trigger the
      * signal if that event never comes */
-    scheduleMdevctlUpdate(priv, (event_type == G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT));
+    VIR_WITH_OBJECT_LOCK_GUARD(priv) {
+        scheduleMdevctlUpdate(priv, (event_type == G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT));
+    }
 }