From: "Mateusz Jończyk" <mat.jonczyk@o2.pl>
To: Thomas Gleixner <tglx@linutronix.de>,
Borislav Petkov <bp@alien8.de>,
linux-rtc@vger.kernel.org,
Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
Frederic Weisbecker <frederic@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Chris Bainbridge <chris.bainbridge@gmail.com>
Subject: Re: [ BUG: Invalid wait context ] rtc_lock at: mc146818_avoid_UIP
Date: Fri, 4 Apr 2025 01:46:19 +0200 [thread overview]
Message-ID: <8b7dedfc-b97d-4ff8-86af-8c92b3fb37cf@o2.pl> (raw)
In-Reply-To: <87sempv17b.ffs@tglx>
W dniu 3.04.2025 o 15:12, Thomas Gleixner pisze:
> On Sun, Mar 30 2025 at 13:32, Borislav Petkov wrote:
>> while playing with suspend to RAM, I got this lockdep splat below.
>>
>> Poking around I found:
>>
>> ec5895c0f2d8 ("rtc: mc146818-lib: extract mc146818_avoid_UIP")
>>
>> which is doing this funky taking and dropping the rtc_lock and I guess that's
>> inherited from ye olde times.
>>
>> I "fixed" it so lockdeup doesn't warn by converting rtc_lock to a raw spinlock
>> but this is definitely not the right fix so let me bounce it off to the folks
>> on Cc who might have a better idea perhaps...
> Converting it to a raw lock "fixes" the problem, but RT people will hunt
> you down with a big latency bat.
>
> But this is not related to the commit above and not new.
>
> timekeeping_suspend() has always invoked mach_get_cmos_time() with the
> freeze lock held and mc146818_get_time() has always locked rtc_lock.
>
> I wonder, why this splat hasn't popped before. On RT lockdep should have
> complained forever. Sebastian???
Hello,
I was able to trigger the bug on Linux 6.1.0 with
CONFIG_PROVE_RAW_LOCK_NESTING enabled and I suspect it can be
triggered much earlier.
It is likely that only after
commit 560af5dc839eef ("lockdep: Enable PROVE_RAW_LOCK_NESTING with PROVE_LOCKING.")
people are seeing this simply because no one previously did
the test with CONFIG_PROVE_RAW_LOCK_NESTING=y.
See https://lore.kernel.org/all/CAP-bSRZ0CWyZZsMtx046YV8L28LhY0fson2g4EqcwRAVN1Jk+Q@mail.gmail.com/ :
> This splat happens on suspend/resume on a HP laptop. It doesn't appear
> to be a recent regression, as a bisect only leads to 560af5dc839e
> ("lockdep: Enable PROVE_RAW_LOCK_NESTING with PROVE_LOCKING.") -
Ccing Chris Bainbridge <chris.bainbridge@gmail.com>, author of the
previous bug report.
Greetings,
Mateusz
next prev parent reply other threads:[~2025-04-03 23:53 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-30 11:32 Borislav Petkov
2025-03-30 12:23 ` Mateusz Jończyk
2025-03-30 12:32 ` Mateusz Jończyk
2025-04-03 13:12 ` Thomas Gleixner
2025-04-03 13:50 ` Sebastian Andrzej Siewior
2025-04-03 19:36 ` Sebastian Andrzej Siewior
2025-04-03 20:26 ` Thomas Gleixner
2025-04-04 6:16 ` Sebastian Andrzej Siewior
2025-04-04 13:34 ` [PATCH] timekeeping: Add a lockdep override in tick_freeze() Sebastian Andrzej Siewior
2025-04-04 18:47 ` Mateusz Jończyk
2025-04-09 19:13 ` Peter Zijlstra
2025-04-09 21:12 ` [tip: timers/urgent] " tip-bot2 for Sebastian Andrzej Siewior
2025-05-31 18:27 ` [PATCH] " Chris Bainbridge
2025-05-31 19:16 ` Chris Bainbridge
2025-06-02 19:52 ` Mateusz Jończyk
2025-06-02 20:20 ` [DRAFT PATCH] rtc-cmos: use spin_lock_irqsave in cmos_interrupt Mateusz Jończyk
2025-06-02 21:19 ` Chris Bainbridge
2025-06-03 6:47 ` Sebastian Andrzej Siewior
2025-04-03 23:46 ` Mateusz Jończyk [this message]
2025-04-04 7:39 ` [ BUG: Invalid wait context ] rtc_lock at: mc146818_avoid_UIP Thomas Gleixner
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=8b7dedfc-b97d-4ff8-86af-8c92b3fb37cf@o2.pl \
--to=mat.jonczyk@o2.pl \
--cc=alexandre.belloni@bootlin.com \
--cc=bigeasy@linutronix.de \
--cc=bp@alien8.de \
--cc=chris.bainbridge@gmail.com \
--cc=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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®