Commit 39e25a2
committed
sched_ext: Drop NONE early return in scx_disable_and_exit_task()
d3e73a0 ("sched_ext: Handle SCX_TASK_NONE in disable/switched_from
paths") skipped the trailing scx_set_task_sched(p, NULL) on NONE tasks.
After scx_fail_parent() parks a task at NONE/sched=parent and the parent
is later freed via queue_rcu_work() during root_disable, the preserved
p->scx.sched dangles - print_scx_info() from sched_show_task() reads
sch->ops.name from freed memory.
Drop the early return. __scx_disable_and_exit_task() already short-
circuits on NONE and the SUB_INIT block was cleared by
scx_fail_parent()'s earlier call, so clearing p->scx.sched is the only
work left - and the one thing the path actually needs.
v2: Extend the SUB_INIT block comment to note that the flag is only
set on the sub-enable path, so it's always clear on the NONE
re-entry (Andrea).
Fixes: d3e73a0 ("sched_ext: Handle SCX_TASK_NONE in disable/switched_from paths")
Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Andrea Righi <arighi@nvidia.com>1 parent 9a415cc commit 39e25a2
1 file changed
Lines changed: 2 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3703 | 3703 | | |
3704 | 3704 | | |
3705 | 3705 | | |
3706 | | - | |
3707 | | - | |
3708 | | - | |
3709 | | - | |
3710 | | - | |
3711 | | - | |
3712 | | - | |
3713 | | - | |
3714 | | - | |
3715 | 3706 | | |
3716 | 3707 | | |
3717 | 3708 | | |
3718 | 3709 | | |
3719 | 3710 | | |
3720 | 3711 | | |
3721 | | - | |
| 3712 | + | |
| 3713 | + | |
3722 | 3714 | | |
3723 | 3715 | | |
3724 | 3716 | | |
| |||
0 commit comments