Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sched_ext: Test sched_class directly in scx_task_iter_next_filtered()
scx_task_iter_next_filtered() is used to iterate all non-idle tasks in the init and exit paths. Idle tasks are determined using is_idle_task(). Unfortunately, cff9b23 ("kernel/sched: Modify initial boot task idle setup") changed idle task initialization so that %PF_IDLE is set during CPU startup. So, CPUs that are not brought up during boot (such as CPUs which can never be online in some AMD processors) don't have the flag set and thus fails is_idle_task() test. This makes sched_ext incorrectly try to operate on idle tasks in init/exit paths leading to oopses. Fix it by directly testing p->sched_class against idle_sched_class.
- Loading branch information