summaryrefslogtreecommitdiff
path: root/include/linux/timerqueue.h
diff options
context:
space:
mode:
authorAndrea Righi <arighi@nvidia.com>2026-10-21 09:05:35 +0200
committerTejun Heo <tj@kernel.org>2026-10-21 08:50:20 -1000
commit3b1c7c74a6da97f86bdd31c66e8c592aa4372e16 (patch)
tree2924d925c7fe380f95a2c102b74595a5279c47bd /include/linux/timerqueue.h
parent9b5ce4345bf4d01dbf9ae5f6f6b1fb9cfdfc7b48 (diff)
sched/core: Avoid requeueing a singleton balance callback
With proxy execution, __schedule() can call set_next_task_scx() with SNT_REPICK and then SNT_PICK for the same donor. Both calls queue the kick_sync balance callback while kick_sync_pending remains set. When the callback is the only list entry, its next pointer is NULL, so the existing duplicate check misses it. Queueing it again links it to itself and causes the wait to run twice. Also check whether the callback is already the head of the list to reject the second insertion. This covers the kick_sync callback because nothing else is queued between SNT_REPICK and SNT_PICK. Requeueing the tail of a longer list remains possible and is outside the scope of this fix. Fixes: e2859566ffbc ("sched_ext: Queue the kick_sync wait from set_next_task_scx()") Reported-by: Tejun Heo <tj@kernel.org> Link: https://lore.kernel.org/r/08cac02c604dd73ef96fc92eb29d692b@kernel.org Signed-off-by: Andrea Righi <arighi@nvidia.com> Acked-by: Tejun Heo <tj@kernel.org> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions