mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] rtc-ds1305: Use disable_irq_nosync() from within irq handlers.
@ 2009-04-16  5:55 Ben Nizette
  2009-04-16 16:31 ` David Brownell
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Nizette @ 2009-04-16  5:55 UTC (permalink / raw)
  To: p_gortmaker; +Cc: David Brownell, linux-kernel


disable_irq() should wait for all running handlers to complete
before returning.  As such, if it's used to disable an interrupt
from that interrupt's handler it will deadlock.  This replaces
the dangerous instances with the _nosync() variant which doesn't
have this problem.

Signed-off-by: Ben Nizette <bn@niasdigital.com>
---
diff --git a/drivers/rtc/rtc-ds1305.c b/drivers/rtc/rtc-ds1305.c
index fc372df..5c4f789 100644
--- a/drivers/rtc/rtc-ds1305.c
+++ b/drivers/rtc/rtc-ds1305.c
@@ -514,7 +514,7 @@ static irqreturn_t ds1305_irq(int irq, void *p)
 {
 	struct ds1305		*ds1305 = p;
 
-	disable_irq(irq);
+	disable_irq_nosync(irq);
 	schedule_work(&ds1305->work);
 	return IRQ_HANDLED;
 }
-- 
1.6.0.2




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

end of thread, other threads:[~2009-04-16 16:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-16  5:55 [PATCH] rtc-ds1305: Use disable_irq_nosync() from within irq handlers Ben Nizette
2009-04-16 16:31 ` David Brownell

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

Powered by JetHome