diff options
author | Sunil Mushran <sunil.mushran@oracle.com> | 2008-07-07 19:06:29 +0200 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2008-07-07 20:24:29 +0200 |
commit | 18c6ac383f3e46cfce08d0bf972705852a4e1268 (patch) | |
tree | 5033900d63758c6259a6af667a07765d0c9dde11 /fs/ocfs2/dlm/dlmmaster.c | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 (diff) | |
download | linux-18c6ac383f3e46cfce08d0bf972705852a4e1268.tar.xz linux-18c6ac383f3e46cfce08d0bf972705852a4e1268.zip |
[PATCH] ocfs2/dlm: Fixes oops in dlm_new_lockres()
Patch fixes a race that can result in an oops while adding a
lockres to the dlm lockres tracking list.
Bug introduced by mainline commit 29576f8bb54045be944ba809d4fca1ad77c94165.
Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/dlm/dlmmaster.c')
-rw-r--r-- | fs/ocfs2/dlm/dlmmaster.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c index efc015c6128a..44f87caf3683 100644 --- a/fs/ocfs2/dlm/dlmmaster.c +++ b/fs/ocfs2/dlm/dlmmaster.c @@ -606,7 +606,9 @@ static void dlm_init_lockres(struct dlm_ctxt *dlm, res->last_used = 0; + spin_lock(&dlm->spinlock); list_add_tail(&res->tracking, &dlm->tracking_list); + spin_unlock(&dlm->spinlock); memset(res->lvb, 0, DLM_LVB_LEN); memset(res->refmap, 0, sizeof(res->refmap)); |