summaryrefslogtreecommitdiffstats
path: root/fs/dlm/user.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2008-01-14 22:48:58 +0100
committerDavid Teigland <teigland@redhat.com>2008-01-30 18:04:42 +0100
commitce5246b972f7514af899a63c0faf831d05ed5ee1 (patch)
treefe7c58c280bde924f88adf5da2620ecf433293bd /fs/dlm/user.c
parentdlm: limit dir lookup loop (diff)
downloadlinux-ce5246b972f7514af899a63c0faf831d05ed5ee1.tar.xz
linux-ce5246b972f7514af899a63c0faf831d05ed5ee1.zip
dlm: fix possible use-after-free
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>
Diffstat (limited to 'fs/dlm/user.c')
-rw-r--r--fs/dlm/user.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/dlm/user.c b/fs/dlm/user.c
index 4f741546f4bb..eb6164816948 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);