Skip to content

Commit

Permalink
[PATCH] ocfs2/dlm: Fixes oops in dlm_new_lockres()
Browse files Browse the repository at this point in the history
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 29576f8.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
  • Loading branch information
Sunil Mushran authored and Mark Fasheh committed Jul 7, 2008
1 parent b2798bf commit 18c6ac3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/ocfs2/dlm/dlmmaster.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 18c6ac3

Please sign in to comment.