linux-stable/include/linux/sched
Wander Lairson Costa 893cdaaa39 sched: avoid false lockdep splat in put_task_struct()
In put_task_struct(), a spin_lock is indirectly acquired under the kernel
stock. When running the kernel in real-time (RT) configuration, the
operation is dispatched to a preemptible context call to ensure
guaranteed preemption. However, if PROVE_RAW_LOCK_NESTING is enabled
and __put_task_struct() is called while holding a raw_spinlock, lockdep
incorrectly reports an "Invalid lock context" in the stock kernel.

This false splat occurs because lockdep is unaware of the different
route taken under RT. To address this issue, override the inner wait
type to prevent the false lockdep splat.

Suggested-by: Oleg Nesterov <oleg@redhat.com>
Suggested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Wander Lairson Costa <wander@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20230614122323.37957-3-wander@redhat.com
2023-07-13 15:21:48 +02:00
..
affinity.h
autogroup.h
clock.h sched/clock: Provide local_clock_noinstr() 2023-06-05 21:11:09 +02:00
cond_resched.h
coredump.h
cpufreq.h
cputime.h
deadline.h
debug.h
hotplug.h
idle.h
init.h
isolation.h
jobctl.h
loadavg.h
mm.h IOMMU Updates for Linux 6.4 2023-04-30 13:00:38 -07:00
nohz.h
numa_balancing.h
posix-timers.h
prio.h
rseq_api.h
rt.h
sd_flags.h sched/topology: Remove SHARED_CHILD from ASYM_PACKING 2023-05-08 10:58:37 +02:00
signal.h posix-timers: Ensure timer ID search-loop limit is valid 2023-06-18 22:41:48 +02:00
smt.h
stat.h
sysctl.h
task.h sched: avoid false lockdep splat in put_task_struct() 2023-07-13 15:21:48 +02:00
task_flags.h
task_stack.h
thread_info_api.h
topology.h sched/topology: Mark set_sched_topology() __init 2023-06-16 17:08:01 +02:00
types.h
user.h
vhost_task.h fork, vhost: Use CLONE_THREAD to fix freezer/ps regression 2023-06-01 17:15:33 -04:00
wake_q.h
xacct.h