Ubuntu-focal-kernel/kernel/sched
Pietro Borrello 094ea14cf2 sched/rt: pick_next_rt_entity(): check list_entry
BugLink: https://bugs.launchpad.net/bugs/2017706

[ Upstream commit 7c4a5b89a0b5a57a64b601775b296abf77a9fe97 ]

Commit 326587b840 ("sched: fix goto retry in pick_next_task_rt()")
removed any path which could make pick_next_rt_entity() return NULL.
However, BUG_ON(!rt_se) in _pick_next_task_rt() (the only caller of
pick_next_rt_entity()) still checks the error condition, which can
never happen, since list_entry() never returns NULL.
Remove the BUG_ON check, and instead emit a warning in the only
possible error condition here: the queue being empty which should
never happen.

Fixes: 326587b840 ("sched: fix goto retry in pick_next_task_rt()")
Signed-off-by: Pietro Borrello <borrello@diag.uniroma1.it>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Phil Auld <pauld@redhat.com>
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Link: https://lore.kernel.org/r/20230128-list-entry-null-check-sched-v3-1-b1a71bd1ac6b@diag.uniroma1.it
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Luke Nowakowski-Krijger <luke.nowakowskikrijger@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
2023-05-12 17:14:59 +02:00
..
Makefile
autogroup.c
autogroup.h
clock.c
completion.c
core.c panic: Consolidate open-coded panic_on_warn checks 2023-03-21 10:09:01 +01:00
cpuacct.c
cpudeadline.c
cpudeadline.h
cpufreq.c
cpufreq_schedutil.c
cpupri.c
cpupri.h
cputime.c
deadline.c sched/deadline,rt: Remove unused parameter from pick_next_[rt|dl]_entity() 2023-05-12 17:14:59 +02:00
debug.c
fair.c sched/fair: Fix cfs_rq_clock_pelt() for throttled cfs_rq 2022-08-26 11:07:41 +02:00
features.h sched/rt: Disable RT_RUNTIME_SHARE by default 2022-09-16 10:59:13 +02:00
idle.c
isolation.c
loadavg.c
membarrier.c
pelt.c
pelt.h sched/fair: Fix cfs_rq_clock_pelt() for throttled cfs_rq 2022-08-26 11:07:41 +02:00
psi.c sched/psi: Fix use-after-free in ep_remove_wait_queue() 2023-04-18 17:21:04 +02:00
rt.c sched/rt: pick_next_rt_entity(): check list_entry 2023-05-12 17:14:59 +02:00
sched-pelt.h
sched.h sched/fair: Fix cfs_rq_clock_pelt() for throttled cfs_rq 2022-08-26 11:07:41 +02:00
stats.c
stats.h
stop_task.c
swait.c
topology.c
wait.c
wait_bit.c