lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 16 Apr 2009 15:55:06 +1000
From:	Ben Nizette <bn@...sdigital.com>
To:	p_gortmaker@...oo.com
Cc:	David Brownell <david-b@...bell.net>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: [PATCH] rtc-ds1305: Use disable_irq_nosync() from within irq
	handlers.


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@...sdigital.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



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ