* master - lvmetad: Fix a possible deadlock.
@ 2012-12-16 23:54 Petr Rockai
0 siblings, 0 replies; only message in thread
From: Petr Rockai @ 2012-12-16 23:54 UTC (permalink / raw)
To: lvm-devel
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=fae1a611d2f907aa23c237b9f84df5089d30f728
Commit: fae1a611d2f907aa23c237b9f84df5089d30f728
Parent: ed23da95b63308e11f8d680b189686a5d2d380d0
Author: Petr Rockai <prockai@redhat.com>
AuthorDate: Mon Dec 17 00:39:00 2012 +0100
Committer: Petr Rockai <prockai@redhat.com>
CommitterDate: Mon Dec 17 00:47:55 2012 +0100
lvmetad: Fix a possible deadlock.
If an update and a query were running in parallel, there was a slim but non-zero
chance of a deadlock due to (unnecessary) mutex nesting.
---
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 4e02662..674ddea 100644
--- a/daemons/lvmetad/lvmetad-core.c
+++ b/daemons/lvmetad/lvmetad-core.c
@@ -671,8 +671,8 @@ static int update_metadata(lvmetad_state *s, const char *name, const char *_vgid
lock_vgid_to_metadata(s);
old = dm_hash_lookup(s->vgid_to_metadata, _vgid);
- lock_vg(s, _vgid);
unlock_vgid_to_metadata(s);
+ lock_vg(s, _vgid);
seq = dm_config_find_int(metadata, "metadata/seqno", -1);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-12-16 23:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-16 23:54 master - lvmetad: Fix a possible deadlock Petr Rockai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.