lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250330113202.GAZ-krsjAnurOlTcp-@fat_crate.local>
Date: Sun, 30 Mar 2025 13:32:02 +0200
From: Borislav Petkov <bp@...en8.de>
To: linux-rtc@...r.kernel.org,
	Alexandre Belloni <alexandre.belloni@...tlin.com>,
	Mateusz Jończyk <mat.jonczyk@...pl>
Cc: lkml <linux-kernel@...r.kernel.org>,
	Anna-Maria Behnsen <anna-maria@...utronix.de>,
	Frederic Weisbecker <frederic@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: [ BUG: Invalid wait context ] rtc_lock at: mc146818_avoid_UIP

So,

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...

Thx.

[   95.916425] 
[   95.917942] =============================
[   95.921970] [ BUG: Invalid wait context ]
[   95.925993] 6.14.0-rc7+ #1 Not tainted
[   95.929762] -----------------------------
[   95.933784] swapper/7/0 is trying to lock:
[   95.937898] ffffffff8284ad18 (rtc_lock){....}-{3:3}, at: mc146818_avoid_UIP+0x36/0x120
[   95.945854] other info that might help us debug this:
[   95.950925] context-{5:5}
[   95.953559] 1 lock held by swapper/7/0:
[   95.957409]  #0: ffffffff8299d2f8 (tick_freeze_lock){....}-{2:2}, at: tick_freeze+0x12/0x110
[   95.965884] stack backtrace:
[   95.968779] CPU: 7 UID: 0 PID: 0 Comm: swapper/7 Not tainted 6.14.0-rc7+ #1 PREEMPT(voluntary) 
[   95.968785] Hardware name: Supermicro Super Server/H12SSL-i, BIOS 2.5 09/08/2022
[   95.968787] Call Trace:
[   95.968790]  <TASK>
[   95.968793]  dump_stack_lvl+0x68/0x90
[   95.968802]  __lock_acquire+0xe96/0x2210
[   95.968811]  ? srso_alias_return_thunk+0x5/0xfbef5
[   95.968816]  ? __lock_acquire+0x45d/0x2210
[   95.968825]  lock_acquire+0xd8/0x300
[   95.968829]  ? mc146818_avoid_UIP+0x36/0x120
[   95.968836]  ? lock_acquire+0xd8/0x300
[   95.968842]  ? srso_alias_return_thunk+0x5/0xfbef5
[   95.968850]  ? __pfx_mc146818_get_time_callback+0x10/0x10
[   95.968854]  _raw_spin_lock_irqsave+0x47/0x70
[   95.968860]  ? mc146818_avoid_UIP+0x36/0x120
[   95.968865]  mc146818_avoid_UIP+0x36/0x120
[   95.968874]  mc146818_get_time+0x39/0x110
[   95.968883]  mach_get_cmos_time+0x2d/0x70
[   95.968890]  ? srso_alias_return_thunk+0x5/0xfbef5
[   95.968894]  ? find_held_lock+0x2b/0x80
[   95.968900]  ? ktime_get+0x1a/0xe0
[   95.968908]  timekeeping_suspend+0x28/0x420
[   95.968918]  tick_freeze+0x7e/0x110
[   95.968923]  enter_s2idle_proper+0x21/0x120
[   95.968930]  cpuidle_enter_s2idle+0x65/0x90
[   95.968937]  do_idle+0x237/0x260
[   95.968947]  cpu_startup_entry+0x25/0x30
[   95.968952]  start_secondary+0x11c/0x140
[   95.968960]  common_startup_64+0x13e/0x141
[   95.968980]  </TASK>



-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ