public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: RHEL47 - dlm-kernel: Don't free lock_info struct if a conversion fails
@ 2009-01-06 21:53 Chris Feist
0 siblings, 0 replies; only message in thread
From: Chris Feist @ 2009-01-06 21:53 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=48a8896a0e35d0fbc7e275216ae809c8854f5b01
Commit: 48a8896a0e35d0fbc7e275216ae809c8854f5b01
Parent: df27ce8d386c4c852feca8b9e25a1279ca8b1f50
Author: Christine Caulfield <ccaulfie@redhat.com>
AuthorDate: Tue Nov 4 10:53:26 2008 +0000
Committer: Chris Feist <cfeist@redhat.com>
CommitterDate: Tue Jan 6 15:51:25 2009 -0600
dlm-kernel: Don't free lock_info struct if a conversion fails
What can happen is that a lock conversion is attempted while the lock is still
in the process of being granted. This causes the dlm_unlock request to fail and
the lock_request frees the lock_info structure because it thinks the call that
failed was a new lock rather than a conversion.
The fix is a straightforward flag check.
bz#466498
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
---
dlm-kernel/src/device.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlm-kernel/src/device.c b/dlm-kernel/src/device.c
index 18e43db..d7afeaf 100644
--- a/dlm-kernel/src/device.c
+++ b/dlm-kernel/src/device.c
@@ -2,7 +2,7 @@
*******************************************************************************
**
** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
-** Copyright (C) 2004 Red Hat, Inc. All rights reserved.
+** Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
**
** This copyrighted material is made available to anyone wishing to use,
** modify, copy, or redistribute it subject to the terms and conditions
@@ -1023,8 +1023,8 @@ static int do_user_lock(struct file_info *fi, uint8_t cmd, struct dlm_lock_param
return li->li_lksb.sb_lkid;
out_err:
- if (test_bit(LI_FLAG_FIRSTLOCK, &li->li_flags)) {
-
+ if (!(kparams->flags & DLM_LKF_CONVERT) &&
+ test_bit(LI_FLAG_FIRSTLOCK, &li->li_flags)) {
release_lockinfo(li);
}
return status;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-01-06 21:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-06 21:53 cluster: RHEL47 - dlm-kernel: Don't free lock_info struct if a conversion fails Chris Feist
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).