Skip to contentSkip to conversation

ocfs2/dlm: Fixes oops in dlm_new_lockres()

PATCH New Sunil Mushran 2 participants 3 messages Jul 7, 2008 OCFS2

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 fs/ocfs2/dlm/dlmmaster.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
fs/ocfs2/dlm/dlmmaster.c +2 -0
index efc015c..44f87ca 100644
@@ -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));
Signature · 1 line
1.5.4.5
#1 lore raw

PATCH 1/1 ocfs2/dlm: Fixes oops in dlm_new_lockres()

Quoted 4 lines · Sunil Mushran

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.

Ok, looks good... What's the impact? This looks like perhaps I should be pushing up upstream asap...

	--Mark

--
Mark Fasheh

#2 lore raw

PATCH 1/1 ocfs2/dlm: Fixes oops in dlm_new_lockres()

http://oss.oracle.com/pipermail/ocfs2-devel/2008-July/002460.html

Yes... for pushing upstream.

User reported the oops over the weekend.

Quoted 15 lines · Mark Fasheh
Quoted 5 lines · Sunil Mushran

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.

Ok, looks good... What's the impact? This looks like perhaps I should be pushing up upstream asap...

	--Mark

--
Mark Fasheh