Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ce5246b972f7514af899a63c0faf831d05ed5ee1
Commit:     ce5246b972f7514af899a63c0faf831d05ed5ee1
Parent:     755b5eb8bac90b35dc901465a06081aaad94e9ae
Author:     David Teigland <[EMAIL PROTECTED]>
AuthorDate: Mon Jan 14 15:48:58 2008 -0600
Committer:  David Teigland <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 11:04:42 2008 -0600

    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 <[EMAIL PROTECTED]>
---
 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);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to