Re: [LOCKDEP] 2.6.18-rc1: inconsistent {hardirq-on-W} -> {in-hardirq-W} usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 9 Jul 2006 01:05:26 -0400
[email protected] (Joseph Fannin) wrote:

> [   22.488000]
> [   22.488000] =================================
> [   22.488000] [ INFO: inconsistent lock state ]
> [   22.488000] ---------------------------------
> [   22.488000] inconsistent {hardirq-on-W} -> {in-hardirq-W} usage.
> [   22.488000] udevd/2684 [HC1[1]:SC0[0]:HE0:SE1] takes:
> [   22.488000]  (rtc_lock){+-..}, at: [<c0278c1c>] rtc_get_rtc_time+0x2c/0x1a0
> [   22.488000] {hardirq-on-W} state was registered at:
> [   22.488000]   [<c0144229>] lock_acquire+0x69/0x90
> [   22.488000]   [<c033c020>] _spin_lock+0x40/0x50
> [   22.488000]   [<c0106fa3>] get_cmos_time+0x13/0x170
> [   22.488000]   [<c048daeb>] hpet_time_init+0xb/0x70
> [   22.488000]   [<c0487744>] start_kernel+0x1f4/0x470
> [   22.488000]   [<c0100210>] 0xc0100210
> [   22.488000] irq event stamp: 193648

yup, thanks, bug.

--- a/arch/i386/kernel/time.c~get_cmos_time-locking-fix
+++ a/arch/i386/kernel/time.c
@@ -206,15 +206,16 @@ irqreturn_t timer_interrupt(int irq, voi
 unsigned long get_cmos_time(void)
 {
 	unsigned long retval;
+	unsigned long flags;
 
-	spin_lock(&rtc_lock);
+	spin_lock_irqsave(&rtc_lock, flags);
 
 	if (efi_enabled)
 		retval = efi_get_time();
 	else
 		retval = mach_get_cmos_time();
 
-	spin_unlock(&rtc_lock);
+	spin_unlock_irqrestore(&rtc_lock, flags);
 
 	return retval;
 }
_

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux