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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 4 Feb 2008 16:45:09 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Kevin Winchester <kjwinchester@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: v2.6.24-mm1 lockdep.c warning

On Mon, 04 Feb 2008 20:26:00 -0400
Kevin Winchester <kjwinchester@...il.com> wrote:

> Found this in my dmesg:
> 
> [   10.671500] ------------[ cut here ]------------
> [   10.671500] WARNING: at kernel/lockdep.c:2037
> trace_hardirqs_on+0xba/0x113()
> [   10.671500] Pid: 0, comm: swapper Not tainted 2.6.24-mm1 #2
> [   10.671500]  [<c011a54f>] warn_on_slowpath+0x3c/0x4c
> [   10.671500]  [<c01335a0>] ? check_usage_forwards+0x19/0x3b
> [   10.671500]  [<c013376d>] ? mark_lock+0x1ab/0x3ae
> [   10.671500]  [<c026c84d>] ? ata_hsm_qc_complete+0xbc/0xc2
> [   10.671500]  [<c03495eb>] ? _spin_unlock_irq+0x22/0x42
> [   10.671500]  [<c0133b0e>] trace_hardirqs_on+0xba/0x113
> [   10.671500]  [<c03495eb>] _spin_unlock_irq+0x22/0x42
> [   10.671500]  [<c011103d>] hpet_rtc_interrupt+0xe8/0x299
> [   10.671500]  [<c0139547>] handle_IRQ_event+0x1a/0x46
> [   10.671500]  [<c013a359>] handle_edge_irq+0xa6/0x102
> [   10.671500]  [<c013a2b3>] ? handle_edge_irq+0x0/0x102
> [   10.671500]  [<c0106070>] do_IRQ+0x87/0xb0
> [   10.671500]  [<c010470a>] common_interrupt+0x2e/0x34
> [   10.671500]  [<c0102974>] ? default_idle+0x45/0x72
> [   10.671500]  [<c010292f>] ? default_idle+0x0/0x72
> [   10.671500]  [<c01028ff>] cpu_idle+0x73/0xa3
> [   10.671500]  [<c033fcd1>] rest_init+0x61/0x63
> [   10.671500]  =======================
> [   10.671500] ---[ end trace e5cdd42f557be0f0 ]---
> 
yup, I hit that too.  It looks like Ingo has deided to merge the
below into mainline.  I'll put it in the hot-fixes directory.


From: Andrew Morton <akpm@...ux-foundation.org>

Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
---

 include/asm-generic/rtc.h |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff -puN include/linux/rtc.h~hpet-borkage-fix include/linux/rtc.h
diff -puN include/asm-generic/rtc.h~hpet-borkage-fix include/asm-generic/rtc.h
--- a/include/asm-generic/rtc.h~hpet-borkage-fix
+++ a/include/asm-generic/rtc.h
@@ -35,10 +35,11 @@
 static inline unsigned char rtc_is_updating(void)
 {
 	unsigned char uip;
+	unsigned long flags;
 
-	spin_lock_irq(&rtc_lock);
+	spin_lock_irqsave(&rtc_lock, flags);
 	uip = (CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP);
-	spin_unlock_irq(&rtc_lock);
+	spin_unlock_irqrestore(&rtc_lock, flags);
 	return uip;
 }
 
@@ -46,6 +47,8 @@ static inline unsigned int get_rtc_time(
 {
 	unsigned long uip_watchdog = jiffies;
 	unsigned char ctrl;
+	unsigned long flags;
+
 #ifdef CONFIG_MACH_DECSTATION
 	unsigned int real_year;
 #endif
@@ -72,7 +75,7 @@ static inline unsigned int get_rtc_time(
 	 * RTC has RTC_DAY_OF_WEEK, we ignore it, as it is only updated
 	 * by the RTC when initially set to a non-zero value.
 	 */
-	spin_lock_irq(&rtc_lock);
+	spin_lock_irqsave(&rtc_lock, flags);
 	time->tm_sec = CMOS_READ(RTC_SECONDS);
 	time->tm_min = CMOS_READ(RTC_MINUTES);
 	time->tm_hour = CMOS_READ(RTC_HOURS);
@@ -83,7 +86,7 @@ static inline unsigned int get_rtc_time(
 	real_year = CMOS_READ(RTC_DEC_YEAR);
 #endif
 	ctrl = CMOS_READ(RTC_CONTROL);
-	spin_unlock_irq(&rtc_lock);
+	spin_unlock_irqrestore(&rtc_lock, flags);
 
 	if (!(ctrl & RTC_DM_BINARY) || RTC_ALWAYS_BCD)
 	{
_

--
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