diff options
author | Petr Rockai <prockai@redhat.com> | 2014-01-07 03:04:14 +0100 |
---|---|---|
committer | Petr Rockai <prockai@redhat.com> | 2014-01-07 03:04:14 +0100 |
commit | 89e7d81d92274ed60b73332e04ceb966e398a0e6 (patch) | |
tree | bf5aba270d5580d43ad92a79b0cf89c7b0e08b8a /daemons | |
parent | 087d33d73b28fcf42f7db5402c80bd174c3d9451 (diff) | |
download | lvm2-89e7d81d92274ed60b73332e04ceb966e398a0e6.tar.gz |
lvmetad: Fix a corruption-prone race in error path.
Diffstat (limited to 'daemons')
-rw-r--r-- | daemons/lvmetad/lvmetad-core.c | 2 |
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"); |