android_kernel_msm-6.1_noth.../kernel/sched
Peter Zijlstra ac9005946a UPSTREAM: sched: Consider task_struct::saved_state in wait_task_inactive()
With the introduction of task_struct::saved_state in commit
5f220be214 ("sched/wakeup: Prepare for RT sleeping spin/rwlocks")
matching the task state has gotten more complicated. That same commit
changed try_to_wake_up() to consider both states, but
wait_task_inactive() has been neglected.

Sebastian noted that the wait_task_inactive() usage in
ptrace_check_attach() can misbehave when ptrace_stop() is blocked on
the tasklist_lock after it sets TASK_TRACED.

Therefore extract a common helper from ttwu_state_match() and use that
to teach wait_task_inactive() about the PREEMPT_RT locks.

Originally-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://lkml.kernel.org/r/20230601091234.GW83892@hirez.programming.kicks-ass.net

(cherry picked from commit 1c06918788e8ae6e69e4381a2806617312922524)
Bug: 292064955
Change-Id: I2cc02dfdf3c04be146078f80d09c3a87979d79a6
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2023-09-20 21:39:14 +00:00
..
android.h ANDROID: kernel/sched/android.h: add uclamp_* stub functions 2022-04-02 10:47:16 +02:00
autogroup.c sched/all: Change all BUG_ON() instances in the scheduler to WARN_ON_ONCE() 2022-08-12 11:25:10 +02:00
autogroup.h sched/headers: Add header guard to kernel/sched/stats.h and kernel/sched/autogroup.h 2022-02-23 08:22:00 +01:00
build_policy.c sched: Fix missing prototype warnings 2022-05-01 10:03:43 +02:00
build_utility.c sched: Fix missing prototype warnings 2022-05-01 10:03:43 +02:00
clock.c sched/clock: Use try_cmpxchg64 in sched_clock_{local,remote} 2022-05-19 23:46:09 +02:00
completion.c sched/completion: Add wait_for_completion_state() 2022-09-07 21:53:49 +02:00
core.c UPSTREAM: sched: Consider task_struct::saved_state in wait_task_inactive() 2023-09-20 21:39:14 +00:00
core_sched.c sched: Rename task_running() to task_on_cpu() 2022-09-07 21:53:47 +02:00
cpuacct.c Merge branch 'sched/fast-headers' into sched/core 2022-03-15 09:05:05 +01:00
cpudeadline.c sched/core: Introduce sched_asym_cpucap_active() 2022-08-02 12:32:45 +02:00
cpudeadline.h
cpufreq.c ANDROID: android: Export symbols for invoking cpufreq_update_util() 2023-05-18 20:39:10 +00:00
cpufreq_schedutil.c ANDROID: sched: Add vendor hooks for override sugov behavior 2023-09-08 03:14:00 +00:00
cpupri.c Merge 30c999937f ("Merge tag 'sched-core-2022-10-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip") into android-mainline 2022-10-12 10:13:13 +02:00
cpupri.h
cputime.c ANDROID: vendor_hooks: Add hooks for account irqtime process tick 2023-05-19 19:41:20 +00:00
deadline.c UPSTREAM: sched/rt: Fix bad task migration for rt tasks 2023-09-15 18:38:35 +00:00
debug.c Merge 0192445cb2 ("arch: mm: rename FORCE_MAX_ZONEORDER to ARCH_FORCE_MAX_ORDER") into android-mainline 2022-10-20 11:55:38 +02:00
fair.c ANDROID: sched: Add vendor hook for util-update related functions 2023-09-08 03:14:00 +00:00
features.h sched/fair: Introduce SIS_UTIL to search idle CPU based on sum of util_avg 2022-06-28 09:08:30 +02:00
idle.c context_tracking: Take idle eqs entrypoints over RCU 2022-07-05 13:32:16 -07:00
isolation.c sched/headers: Introduce kernel/sched/build_utility.c and build multiple .c files there 2022-02-23 10:58:33 +01:00
loadavg.c sched/headers: Introduce kernel/sched/build_utility.c and build multiple .c files there 2022-02-23 10:58:33 +01:00
Makefile ANDROID: subsystem-specific vendor_hooks.c for sched 2022-09-07 20:00:36 +00:00
membarrier.c sched/headers: Introduce kernel/sched/build_utility.c and build multiple .c files there 2022-02-23 10:58:33 +01:00
pelt.c ANDROID: sched: Export symbols needed for vendor hooks 2023-09-08 03:14:00 +00:00
pelt.h FROMLIST: sched/pelt: Introduce PELT multiplier 2023-01-05 18:15:33 +08:00
psi.c ANDROID: psi: Add vendor hooks for PSI tracing 2023-05-18 21:53:34 +00:00
rt.c UPSTREAM: sched/rt: Fix bad task migration for rt tasks 2023-09-15 18:38:35 +00:00
sched-pelt.h
sched.h ANDROID: sched: Add oem data in struct rq 2023-06-07 14:25:06 +00:00
smp.h smp: Rename flush_smp_call_function_from_idle() 2022-05-01 10:03:43 +02:00
stats.c sched/headers: Introduce kernel/sched/build_utility.c and build multiple .c files there 2022-02-23 10:58:33 +01:00
stats.h sched/psi: Add PSI_IRQ to track IRQ/SOFTIRQ pressure 2022-09-09 11:08:32 +02:00
stop_task.c sched: Add update_current_exec_runtime helper 2022-08-27 00:05:35 +02:00
swait.c sched/headers: Introduce kernel/sched/build_utility.c and build multiple .c files there 2022-02-23 10:58:33 +01:00
topology.c ANDROID: sched: Export sched_domains_mutex for lockdep 2023-07-15 01:15:00 +00:00
vendor_hooks.c ANDROID: sched: Add vendor hook for rt util update 2023-09-08 03:14:00 +00:00
wait.c Revert "Revert "wait: Return number of exclusive waiters awaken"" 2023-03-30 10:37:08 +00:00
wait_bit.c wait_on_bit: add an acquire memory barrier 2022-08-26 09:30:25 -07:00