summaryrefslogtreecommitdiff
path: root/daemons
diff options
context:
space:
mode:
authorPetr Rockai <prockai@redhat.com>2014-01-07 03:04:14 +0100
committerPetr Rockai <prockai@redhat.com>2014-01-07 03:04:14 +0100
commit89e7d81d92274ed60b73332e04ceb966e398a0e6 (patch)
treebf5aba270d5580d43ad92a79b0cf89c7b0e08b8a /daemons
parent087d33d73b28fcf42f7db5402c80bd174c3d9451 (diff)
downloadlvm2-89e7d81d92274ed60b73332e04ceb966e398a0e6.tar.gz
lvmetad: Fix a corruption-prone race in error path.
Diffstat (limited to 'daemons')
-rw-r--r--daemons/lvmetad/lvmetad-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/daemons/lvmetad/lvmetad-core.c b/daemons/lvmetad/lvmetad-core.c
index bc306f32b..7409839f2 100644
--- a/daemons/lvmetad/lvmetad-core.c
+++ b/daemons/lvmetad/lvmetad-core.c
@@ -903,8 +903,8 @@ static response pv_found(lvmetad_state *s, request r)
if (!dm_hash_insert(s->pvid_to_pvmeta, pvid, cft) ||
!dm_hash_insert_binary(s->device_to_pvid, &device, sizeof(device), (void*)pvid_dup)) {
- unlock_pvid_to_pvmeta(s);
dm_hash_remove(s->pvid_to_pvmeta, pvid);
+ unlock_pvid_to_pvmeta(s);
dm_config_destroy(cft);
dm_free(pvid_dup);
return reply_fail("out of memory");