Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #127 from sched-ext/htejun
Browse files Browse the repository at this point in the history
scx: rq should be locked when calling scx_ops_exit_task() from scx_cancel_fork()
  • Loading branch information
Byte-Lab authored Jan 23, 2024
2 parents 7f7f3c9 + 5046ce8 commit 0c6e66d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions kernel/sched/ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -2524,8 +2524,13 @@ void scx_post_fork(struct task_struct *p)
void scx_cancel_fork(struct task_struct *p)
{
if (scx_enabled()) {
struct rq *rq;
struct rq_flags rf;

rq = task_rq_lock(p, &rf);
WARN_ON_ONCE(scx_get_task_state(p) >= SCX_TASK_READY);
scx_ops_exit_task(p);
task_rq_unlock(rq, p, &rf);
}
percpu_up_read(&scx_fork_rwsem);
}
Expand Down

0 comments on commit 0c6e66d

Please sign in to comment.