diff --git a/WHATS_NEW b/WHATS_NEW index e5efb7a29..284064c28 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.89 - ================================== + Fix missing thread list manipulation protection in dmeventd. Do not derefence lv pointer in _percent_run() function before NULL check. Allow empty strings for description and creation_host config fields. Issue deprecation warning when removing last lvm1-format snapshot. diff --git a/daemons/dmeventd/dmeventd.c b/daemons/dmeventd/dmeventd.c index 027c2e136..b26faf858 100644 --- a/daemons/dmeventd/dmeventd.c +++ b/daemons/dmeventd/dmeventd.c @@ -739,8 +739,10 @@ static void _monitor_unregister(void *arg) return; } thread->status = DM_THREAD_DONE; + pthread_mutex_lock(&_timeout_mutex); UNLINK_THREAD(thread); LINK(thread, &_thread_registry_unused); + pthread_mutex_unlock(&_timeout_mutex); _unlock_mutex(); } @@ -1078,8 +1080,10 @@ static int _unregister_for_event(struct message_data *message_data) * unlink and terminate its monitoring thread. */ if (!thread->events) { + pthread_mutex_lock(&_timeout_mutex); UNLINK_THREAD(thread); LINK(thread, &_thread_registry_unused); + pthread_mutex_unlock(&_timeout_mutex); } _unlock_mutex();