cluster: RHEL55 - dm-log-clustered: Remove an entry from a list before freeing memory (bz544253)
Jonathan Brassow
jbrassow at fedoraproject.org
Tue Dec 22 09:05:32 UTC 2009
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=6819f2d19bf02448b3b099c90450031d60192d06
Commit: 6819f2d19bf02448b3b099c90450031d60192d06
Parent: ab4161cbc2c824fc32ae46e78f2342092ccbf406
Author: Jonathan Brassow <jbrassow at redhat.com>
AuthorDate: Tue Dec 22 03:04:18 2009 -0600
Committer: Jonathan Brassow <jbrassow at redhat.com>
CommitterDate: Tue Dec 22 03:04:18 2009 -0600
dm-log-clustered: Remove an entry from a list before freeing memory (bz544253)
Error handling logic failed to remove an item from a list before freeing
it. Later, when the list is accessed, a panic occurs.
---
cmirror-kernel/src/dm-clog.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/cmirror-kernel/src/dm-clog.c b/cmirror-kernel/src/dm-clog.c
index 17e7486..de30d31 100644
--- a/cmirror-kernel/src/dm-clog.c
+++ b/cmirror-kernel/src/dm-clog.c
@@ -169,6 +169,9 @@ static int cluster_ctr(struct dm_dirty_log *log, struct dm_target *ti,
DMERR(" Userspace cluster log server not found");
if (r) {
+ spin_lock(&log_list_lock);
+ list_del(&lc->list);
+ spin_unlock(&log_list_lock);
kfree(lc);
kfree(ctr_str);
} else {
More information about the cluster-commits
mailing list