mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-31 05:47:43 +03:00
2a9b62c7f9
Individual events are handled through separate threads, so once we have more then a single thread in this eventwait sleeping, we got race on the dm_log setting, since if one event is timeout out on alarm, while another is still waiting, then dm log has been restored to NULL and the next sigalarm has been reported as error. Fix it by introducing counter which is protected via mutex, and only when the last event is released, logging is restored. TODO: libdm seems to have some static vars which may audit for this type of use.