* [Cluster-devel] [PATCH] dlm: fix possible use-after-free
@ 2008-01-21 22:25 David Teigland
0 siblings, 0 replies; only message in thread
From: David Teigland @ 2008-01-21 22:25 UTC (permalink / raw)
To: cluster-devel.redhat.com
The dlm_put_lkb() can free the lkb and its associated ua structure,
so we can't depend on using the ua struct after the put.
Signed-off-by: David Teigland <teigland@redhat.com>
---
fs/dlm/user.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/dlm/user.c b/fs/dlm/user.c
index 4f74154..eb61648 100644
--- a/fs/dlm/user.c
+++ b/fs/dlm/user.c
@@ -236,12 +236,12 @@ void dlm_user_add_ast(struct dlm_lkb *lkb, int type)
spin_unlock(&proc->asts_spin);
if (eol) {
- spin_lock(&ua->proc->locks_spin);
+ spin_lock(&proc->locks_spin);
if (!list_empty(&lkb->lkb_ownqueue)) {
list_del_init(&lkb->lkb_ownqueue);
dlm_put_lkb(lkb);
}
- spin_unlock(&ua->proc->locks_spin);
+ spin_unlock(&proc->locks_spin);
}
out:
mutex_unlock(&ls->ls_clear_proc_locks);
--
1.5.3.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-01-21 22:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-21 22:25 [Cluster-devel] [PATCH] dlm: fix possible use-after-free David Teigland
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 NNTP newsgroup(s).