From: Andrew Morton <akpm@osdl.org>
To: jfannin@gmail.com (Joseph Fannin)
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu, arjan@infradead.org
Subject: Re: [LOCKDEP] 2.6.18-rc1: inconsistent {hardirq-on-W} -> {in-hardirq-W} usage
Date: Sat, 8 Jul 2006 23:25:12 -0700 [thread overview]
Message-ID: <20060708232512.12b59269.akpm@osdl.org> (raw)
In-Reply-To: <20060709050525.GA1149@nineveh.rivenstone.net>
On Sun, 9 Jul 2006 01:05:26 -0400
jfannin@gmail.com (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;
}
_
next prev parent reply other threads:[~2006-07-09 6:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-09 5:05 Joseph Fannin
2006-07-09 6:25 ` Andrew Morton [this message]
2006-07-09 7:45 ` Ingo Molnar
2006-07-11 5:11 ` Joseph Fannin
2006-07-11 7:45 ` [patch] lockdep: HPET/RTC fix Ingo Molnar
2006-07-14 3:57 ` [PATCH] remove unnecessary barrier in rtc_get_rtc_time Steven Rostedt
2006-08-05 21:59 ` [patch] lockdep: HPET/RTC fix Joseph Fannin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060708232512.12b59269.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=arjan@infradead.org \
--cc=jfannin@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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