diff options
author | 2024-08-07 10:17:38 -1000 | |
---|---|---|
committer | 2024-08-08 13:38:09 -1000 | |
commit | 72763ea3d45c7f9fd69b825468afbf4d11c5ffc2 (patch) | |
tree | 61aa7f11ecbdca19d25c62a2ae10bcc2290a5cbb /tools/perf/scripts/python/export-to-postgresql.py | |
parent | sched_ext: Make task_can_run_on_remote_rq() use common task_allowed_on_cpu() (diff) | |
download | wireguard-linux-72763ea3d45c7f9fd69b825468afbf4d11c5ffc2.tar.xz wireguard-linux-72763ea3d45c7f9fd69b825468afbf4d11c5ffc2.zip |
sched_ext: Fix unsafe list iteration in process_ddsp_deferred_locals()
process_ddsp_deferred_locals() executes deferred direct dispatches to the
local DSQs of remote CPUs. It iterates the tasks on
rq->scx.ddsp_deferred_locals list, removing and calling
dispatch_to_local_dsq() on each. However, the list is protected by the rq
lock that can be dropped by dispatch_to_local_dsq() temporarily, so the list
can be modified during the iteration, which can lead to oopses and other
failures.
Fix it by popping from the head of the list instead of iterating the list.
Signed-off-by: Tejun Heo <tj@kernel.org>
Fixes: 5b26f7b920f7 ("sched_ext: Allow SCX_DSQ_LOCAL_ON for direct dispatches")
Acked-by: David Vernet <void@manifault.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions