twx-linux/kernel/time
Sebastian Andrzej Siewior dc18c5b130 timekeeping: Add a lockdep override in tick_freeze()
[ Upstream commit 92e250c624ea37fde64bfd624fd2556f0d846f18 ]

tick_freeze() acquires a raw spinlock (tick_freeze_lock). Later in the
callchain (timekeeping_suspend() -> mc146818_avoid_UIP()) the RTC driver
acquires a spinlock which becomes a sleeping lock on PREEMPT_RT.  Lockdep
complains about this lock nesting.

Add a lockdep override for this special case and a comment explaining
why it is okay.

Reported-by: Borislav Petkov <bp@alien8.de>
Reported-by: Chris Bainbridge <chris.bainbridge@gmail.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/all/20250404133429.pnAzf-eF@linutronix.de
Closes: https://lore.kernel.org/all/20250330113202.GAZ-krsjAnurOlTcp-@fat_crate.local/
Closes: https://lore.kernel.org/all/CAP-bSRZ0CWyZZsMtx046YV8L28LhY0fson2g4EqcwRAVN1Jk+Q@mail.gmail.com/
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-02 07:51:00 +02:00
..
alarmtimer.c alarmtimer: Remove unnecessary (void *) cast 2023-06-18 22:41:53 +02:00
clockevents.c
clocksource-wdtest.c clocksource: Scale the watchdog read retries automatically 2024-08-14 13:58:56 +02:00
clocksource.c clocksource: Use migrate_disable() to avoid calling get_random_u32() in atomic context 2025-02-21 13:57:20 +01:00
hrtimer.c hrtimers: Mark is_migration_base() with __always_inline 2025-03-22 12:50:40 -07:00
itimer.c
jiffies.c
Kconfig
Makefile
namespace.c
ntp_internal.h
ntp.c ntp: Remove invalid cast in time offset math 2024-12-14 19:59:44 +01:00
posix-clock.c posix-clock: posix-clock: Fix unbalanced locking in pc_clock_settime() 2024-11-01 01:58:30 +01:00
posix-cpu-timers.c posix-cpu-timers: Implement the missing timer_wait_running callback 2023-04-21 15:34:33 +02:00
posix-stubs.c posix-timers: Get rid of [COMPAT_]SYS_NI() uses 2024-01-20 11:51:46 +01:00
posix-timers.c posix-timers: Refer properly to CONFIG_HIGH_RES_TIMERS 2023-06-18 22:41:53 +02:00
posix-timers.h
sched_clock.c time/sched_clock: Provide sched_clock_noinstr() 2023-06-05 21:11:04 +02:00
test_udelay.c time/debug: Fix memory leak with using debugfs_lookup() 2023-02-09 20:12:27 +01:00
tick-broadcast-hrtimer.c
tick-broadcast.c tick/broadcast: Move per CPU pointer access into the atomic section 2024-08-14 13:58:55 +02:00
tick-common.c timekeeping: Add a lockdep override in tick_freeze() 2025-05-02 07:51:00 +02:00
tick-internal.h
tick-legacy.c
tick-oneshot.c
tick-sched.c tick/sched: Preserve number of idle sleeps across CPU hotplug events 2024-01-31 16:19:13 -08:00
tick-sched.h tick: Move got_idle_tick away from common flags 2024-08-29 17:33:35 +02:00
time_test.c time: test: Fix incorrect format specifier 2024-03-26 18:19:18 -04:00
time.c time: Fix references to _msecs_to_jiffies() handling of values 2024-12-09 10:31:50 +01:00
timeconst.bc
timeconv.c
timecounter.c
timekeeping_debug.c
timekeeping_internal.h
timekeeping.c timekeeping: Fix bogus clock_was_set() invocation in do_adjtimex() 2024-08-14 13:58:57 +02:00
timekeeping.h
timer_list.c
timer.c
vsyscall.c