Gitweb:
http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=e63caa901a5...
Commit: e63caa901a58d4274a3d5503d7f7186c6a6467a6
Parent: 0cce9f812d2238777797491104d520fdd825c3fa
Author: Ryan McCabe <rmccabe(a)redhat.com>
AuthorDate: Tue Feb 26 10:57:47 2013 -0500
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Tue Feb 26 10:57:47 2013 -0500
rgmanager: Fix potential unlocked memory access
Fix a potential unlocked access of the resource list.
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
---
rgmanager/src/daemons/groups.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/rgmanager/src/daemons/groups.c b/rgmanager/src/daemons/groups.c
index 4a22dca..13ab1f8 100644
--- a/rgmanager/src/daemons/groups.c
+++ b/rgmanager/src/daemons/groups.c
@@ -1795,7 +1795,9 @@ init_resource_groups(int reconfigure, int do_init)
do_condstops();
+ pthread_rwlock_rdlock(&resource_lock);
copy_incarnations(&_resources, &reslist);
+ pthread_rwlock_unlock(&resource_lock);
}
/* Swap in the new configuration */