mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: "Borislav Petkov" <bp@alien8.de>,
	linux-rtc@vger.kernel.org,
	"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
	"Mateusz Jończyk" <mat.jonczyk@o2.pl>,
	lkml <linux-kernel@vger.kernel.org>,
	"Anna-Maria Behnsen" <anna-maria@linutronix.de>,
	"Frederic Weisbecker" <frederic@kernel.org>,
	"Peter Zijlstra" <peterz@infradead.org>
Subject: Re: [ BUG: Invalid wait context ] rtc_lock at: mc146818_avoid_UIP
Date: Thu, 3 Apr 2025 21:36:59 +0200	[thread overview]
Message-ID: <20250403193659.hhUTgJLH@linutronix.de> (raw)
In-Reply-To: <20250403135031.giGKVTEO@linutronix.de>

On 2025-04-03 15:50:32 [+0200], To Thomas Gleixner wrote:
> On 2025-04-03 15:12:08 [+0200], Thomas Gleixner wrote:
> > 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???
> 
> I sure haven't seen it. But it has to.

might_sleep() is quite because system_states is SYSTEM_SUSPEND.
lockdep seems to be quiet because I don't have an outer lock while
testing via
	echo mem > /sys/power/state

it is just
| WARNING: CPU: 0 PID: 1007 at kernel/time/timekeeping.c:1858 timekeeping_suspend+0x3b/0x330
| RIP: 0010:timekeeping_suspend+0x3b/0x330
| Call Trace:
|  <TASK>
|  syscore_suspend+0x80/0x2f0
|  suspend_devices_and_enter+0x21c/0xad0
|  pm_suspend+0x25c/0x6b0
|  state_store+0x68/0xd0
|  kernfs_fop_write_iter+0x15e/0x210
|  vfs_write+0x2bb/0x560
|  ksys_write+0x73/0xf0
|  do_syscall_64+0x91/0x1a0

> > Thanks,
> > 
> >         tglx

Sebastian

  reply	other threads:[~2025-04-03 19:37 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 [this message]
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   ` [ BUG: Invalid wait context ] rtc_lock at: mc146818_avoid_UIP Mateusz Jończyk
2025-04-04  7:39     ` 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=20250403193659.hhUTgJLH@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=alexandre.belloni@bootlin.com \
    --cc=anna-maria@linutronix.de \
    --cc=bp@alien8.de \
    --cc=frederic@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=mat.jonczyk@o2.pl \
    --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®