From: Thomas Gleixner <tglx@linutronix.de>
To: Sven-Thorsten Dietrich <sven@thebigcorporation.com>
Cc: Ingo Molnar <mingo@elte.hu>, LKML <Linux-kernel@vger.kernel.org>
Subject: Re: LOCKDEP: possible irq lock inversion dependency detected
Date: Wed, 23 May 2007 06:06:20 +0200 [thread overview]
Message-ID: <1179893180.12708.145.camel@chaos> (raw)
In-Reply-To: <1179879569.25500.74.camel@sx.thebigcorporation.com>
On Tue, 2007-05-22 at 17:19 -0700, Sven-Thorsten Dietrich wrote:
> swapper/1 just changed the state of lock:
> (rtc_lock#2){-...}, at: [<ffffffff8085b185>] sbf_init+0x25/0xe0
> but this lock was taken by another, hard-irq-safe lock in the past:
> (xtime_lock){+...}
>
> and interrupts could create inverse lock ordering between them.
>
>
> other info that might help us debug this:
> no locks held by swapper/1.
>
> the first lock's dependencies:
> -> (rtc_lock#2){-...} ops: 2 {
> initial-use at:
> [<ffffffff8025d383>] mark_lock+0xf3/0x5b0
> [<ffffffff8025e6f4>] __lock_acquire+0x664/0xf80
> [<ffffffff8025f098>] lock_acquire+0x88/0xc0
> [<ffffffff8047e2c5>] rt_spin_lock+0x35/0x40
> [<ffffffff8020e162>] read_persistent_clock+0x22/0x1b0
> [<ffffffff80867e86>] timekeeping_init+0x86/0x100
> [<ffffffff808537af>] start_kernel+0x1bf/0x350
> [<ffffffff80853179>] _sinittext+0x179/0x180
> [<ffffffffffffffff>] 0xffffffffffffffff
Hmm. That's the code in question:
void __init timekeeping_init(void)
{
unsigned long flags;
unsigned long sec = read_persistent_clock();
write_seqlock_irqsave(&xtime_lock, flags);
The rtc_lock is never taken inside the xtime_lock.
Looks like code reordering due to gcc extra magic. Which compiler ?
Thanks,
tglx
next prev parent reply other threads:[~2007-05-23 4:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-23 0:19 Sven-Thorsten Dietrich
2007-05-23 4:06 ` Thomas Gleixner [this message]
2007-05-23 6:20 ` Ingo Molnar
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=1179893180.12708.145.camel@chaos \
--to=tglx@linutronix.de \
--cc=Linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=sven@thebigcorporation.com \
/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
all inboxes | Powered by JetHome®