public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] - ia64_ctx.lock deadlock
@ 2003-12-27 14:27 Jack Steiner
  2003-12-29 20:23 ` David Mosberger
  2003-12-29 22:31 ` Matthew Wilcox
  0 siblings, 2 replies; 3+ messages in thread
From: Jack Steiner @ 2003-12-27 14:27 UTC (permalink / raw)
  To: linux-ia64

I hit a deadlock involving the ia64_ctx.lock. The lock
may be taken in interrupt context to process an IPI from smp_flush_tlb_mm.

Here is a patch:


--- linux_base/include/asm-ia64/mmu_context.h	Fri Dec 26 11:06:35 2003
+++ linux/include/asm-ia64/mmu_context.h	Sat Dec 27 08:19:35 2003
@@ -95,12 +95,13 @@
 static inline mm_context_t
 get_mmu_context (struct mm_struct *mm)
 {
+	unsigned long flags;
 	mm_context_t context = mm->context;
 
 	if (context)
 		return context;
 
-	spin_lock(&ia64_ctx.lock);
+	spin_lock_irqsave(&ia64_ctx.lock, flags);
 	{
 		/* re-check, now that we've got the lock: */
 		context = mm->context;
@@ -110,7 +111,7 @@
 			mm->context = context = ia64_ctx.next++;
 		}
 	}
-	spin_unlock(&ia64_ctx.lock);
+	spin_unlock_irqrestore(&ia64_ctx.lock, flags);
 	return context;
 }
 
-- 
Thanks

Jack Steiner (steiner@sgi.com)          651-683-5302
Principal Engineer                      SGI - Silicon Graphics, Inc.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-12-29 22:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-27 14:27 [PATCH] - ia64_ctx.lock deadlock Jack Steiner
2003-12-29 20:23 ` David Mosberger
2003-12-29 22:31 ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox