]> sourceware.org Git - lvm2.git/commitdiff
List _thread_registry missed mutex
authorZdenek Kabelac <zkabelac@redhat.com>
Fri, 2 Mar 2012 22:57:25 +0000 (22:57 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 2 Mar 2012 22:57:25 +0000 (22:57 +0000)
Operation on _thread_registry needs to be covered by mutex.
Cosmetic move a die code after free for valgind short leak list.

WHATS_NEW
WHATS_NEW_DM
daemons/dmeventd/dmeventd.c

index 2c16b0a998ec5d03bf15dbd1210a40fe33669b9b..a14924be54eb7cce2e60111a093d4941d8035219 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -12,7 +12,6 @@ Version 2.02.94 -
   Revert free of allocated segtype in init segment error path (2.02.89).
   Test dm_hash_insert() failures in filter-persistent.c and fid_add_mda().
   Ensure clvmd message is always \0 terminated after read.
-  Better detection of missing dmeventd fifo connection (2.02.93).
   Add some close() and dev_close() error path backtraces.
   For polling daemon reopen stdin,stdout,stderr to /dev/null.
   Limit the max size of processed clvmd message to ~8KB.
index f8e7e7bdfa64460fed8cf6e6538103718bcb3e65..e003dac8bef6a76789cdffa54e82eb2f66b4ce15 100644 (file)
@@ -1,8 +1,10 @@
 Version 1.02.73 - 
 ====================================
+  Test _thread_registry list with holding mutex in dmeventd.
   Added dm_tree_node_set_callback() for preload and deactivation hooks.
   Drop unsupported TRIM message for thin pool.
   Improve logging for fifo startup in dmeventd.
+  Better detection of missing dmeventd fifo connection (1.02.71).
   Add few pointer validation in dmsetup.
   Support dm_task_get_driver_version() query without version string.
   Log failure of pthread_join when cleaning unused threads in dmeventd.
index bba06a8eb30a2c095b0cb1d2d47bcad505431ac1..1d70afcabc1af146b06b87d162ea864916fcf697 100644 (file)
@@ -1491,9 +1491,9 @@ static void _process_request(struct dm_event_fifos *fifos)
        if (!_client_write(fifos, &msg))
                stack;
 
-       if (die) raise(9);
-
        dm_free(msg.data);
+
+       if (die) raise(9);
 }
 
 static void _process_initial_registrations(void)
@@ -1987,11 +1987,13 @@ int main(int argc, char *argv[])
        while (!_exit_now) {
                _process_request(&fifos);
                _cleanup_unused_threads();
+               _lock_mutex();
                if (!dm_list_empty(&_thread_registry)
                    || !dm_list_empty(&_thread_registry_unused))
                        _thread_registries_empty = 0;
                else
                        _thread_registries_empty = 1;
+               _unlock_mutex();
        }
 
        _exit_dm_lib();
This page took 0.042275 seconds and 5 git commands to generate.