kernel_optimize_test/kernel/sched
Juri Lelli 26d5eb3c25 sched/deadline: Fix BUG_ON condition for deboosted tasks
commit ddfc710395cccc61247348df9eb18ea50321cbed upstream.

Tasks the are being deboosted from SCHED_DEADLINE might enter
enqueue_task_dl() one last time and hit an erroneous BUG_ON condition:
since they are not boosted anymore, the if (is_dl_boosted()) branch is
not taken, but the else if (!dl_prio) is and inside this one we
BUG_ON(!is_dl_boosted), which is of course false (BUG_ON triggered)
otherwise we had entered the if branch above. Long story short, the
current condition doesn't make sense and always leads to triggering of a
BUG.

Fix this by only checking enqueue flags, properly: ENQUEUE_REPLENISH has
to be present, but additional flags are not a problem.

Fixes: 64be6f1f5f ("sched/deadline: Don't replenish from a !SCHED_DEADLINE entity")
Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20220714151908.533052-1-juri.lelli@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-29 17:19:24 +02:00
..
autogroup.c
autogroup.h
clock.c
completion.c
core.c sched/core: Export pelt_thermal_tp 2022-04-08 14:40:03 +02:00
cpuacct.c
cpudeadline.c
cpudeadline.h
cpufreq_schedutil.c cpufreq: schedutil: Use kobject release() method to free sugov_tunables 2021-10-06 15:55:45 +02:00
cpufreq.c
cpupri.c
cpupri.h
cputime.c cputime, cpuacct: Include guest time in user time in cpuacct.stat 2022-01-27 10:54:25 +01:00
deadline.c sched/deadline: Fix BUG_ON condition for deboosted tasks 2022-07-29 17:19:24 +02:00
debug.c sched/debug: Remove mpol_get/put and task_lock/unlock from sched_show_numa 2022-04-08 14:40:03 +02:00
fair.c sched/fair: Fix cfs_rq_clock_pelt() for throttled cfs_rq 2022-06-09 10:21:02 +02:00
features.h sched,fair: Alternative sched_slice() 2021-05-11 14:47:31 +02:00
idle.c sched/idle: Make the idle timer expire in hard interrupt context 2021-09-26 14:09:02 +02:00
isolation.c
loadavg.c
Makefile
membarrier.c kernel: delete repeated words in comments 2022-02-01 17:25:45 +01:00
pelt.c
pelt.h sched/fair: Fix cfs_rq_clock_pelt() for throttled cfs_rq 2022-06-09 10:21:02 +02:00
psi.c psi: Fix uaf issue when psi trigger is destroyed while being polled 2022-02-05 12:37:55 +01:00
rt.c sched/rt: Try to restart rt period timer when rt runtime exceeded 2022-01-27 10:53:54 +01:00
sched-pelt.h
sched.h sched/fair: Fix cfs_rq_clock_pelt() for throttled cfs_rq 2022-06-09 10:21:02 +02:00
smp.h
stats.c
stats.h
stop_task.c treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
swait.c
topology.c sched/topology: Fix sched_domain_topology_level alloc in sched_init_numa() 2022-03-08 19:09:34 +01:00
wait_bit.c
wait.c wait: add wake_up_pollfree() 2021-12-14 11:32:39 +01:00