sched: Unconditionally use full-fat wait_task_inactive()
authorPeter Zijlstra <peterz@infradead.org>
Fri, 2 Jun 2023 08:42:53 +0000 (10:42 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 5 Jun 2023 19:11:02 +0000 (21:11 +0200)
commitd5e1586617be7093ea3419e3fa9387ed833cdbb1
treec9ba11ab84631bacbdcab7a201be4cecc27a5bb7
parent0dd37d6dd33a9c23351e6115ae8cdac7863bc7de
sched: Unconditionally use full-fat wait_task_inactive()

While modifying wait_task_inactive() for PREEMPT_RT; the build robot
noted that UP got broken. This led to audit and consideration of the
UP implementation of wait_task_inactive().

It looks like the UP implementation is also broken for PREEMPT;
consider task_current_syscall() getting preempted between the two
calls to wait_task_inactive().

Therefore move the wait_task_inactive() implementation out of
CONFIG_SMP and unconditionally use it.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20230602103731.GA630648%40hirez.programming.kicks-ass.net
include/linux/sched.h
kernel/sched/core.c