From a13fa75d8e89d2eb88a707e35ba472b7d6189d07 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 21 Dec 2018 21:29:05 +0100 Subject: [PATCH] dmeventd: unlock lvm2 lock on error path New code missed to unlock locked lvm2 on error path when command is not configured. --- WHATS_NEW | 1 + daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c | 1 + 2 files changed, 2 insertions(+) diff --git a/WHATS_NEW b/WHATS_NEW index 1a9c521b0..1bebff67c 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.03.02 - =================================== + Fix missing unlock on lvm2 dmeventd plugin error path initialization. Improve Makefile dependency tracking. Move VDO support towards V2 target (6.2) support. Fix missing proper initialization of pv_list struct when adding pv. diff --git a/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c b/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c index 95ec36028..04bc8993d 100644 --- a/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c +++ b/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c @@ -159,6 +159,7 @@ int dmeventd_lvm2_command(struct dm_pool *mem, char *buffer, size_t size, dmeventd_lvm2_lock(); if (!dmeventd_lvm2_run(cmd) || !(env = getenv(cmd))) { + dmeventd_lvm2_unlock(); log_error("Unable to find configured command."); return 0; }