diff options
author | Peter Zijlstra <peterz@infradead.org> | 2021-02-24 11:31:09 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2021-03-06 12:40:21 +0100 |
commit | 9e81889c7648d48dd5fe13f41cbc99f3c362484a (patch) | |
tree | e2b33a0421643459bbedd3333ac6f8264380aef7 /crypto/gf128mul.c | |
parent | sched: Optimize migration_cpu_stop() (diff) | |
download | linux-9e81889c7648d48dd5fe13f41cbc99f3c362484a.tar.xz linux-9e81889c7648d48dd5fe13f41cbc99f3c362484a.zip |
sched: Fix affine_move_task() self-concurrency
Consider:
sched_setaffinity(p, X); sched_setaffinity(p, Y);
Then the first will install p->migration_pending = &my_pending; and
issue stop_one_cpu_nowait(pending); and the second one will read
p->migration_pending and _also_ issue: stop_one_cpu_nowait(pending),
the _SAME_ @pending.
This causes stopper list corruption.
Add set_affinity_pending::stop_pending, to indicate if a stopper is in
progress.
Fixes: 6d337eab041d ("sched: Fix migrate_disable() vs set_cpus_allowed_ptr()")
Cc: stable@kernel.org
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>
Link: https://lkml.kernel.org/r/20210224131355.649146419@infradead.org
Diffstat (limited to 'crypto/gf128mul.c')
0 files changed, 0 insertions, 0 deletions