Skip to content
Commit 4c3f6181 authored by Valentin Schneider's avatar Valentin Schneider
Browse files

x86/intel_rdt: Plug task_work vs task_struct {rmid,closid} update race



Nothing prevents the move_myself() task_work callback from being executed
before the task_struct's {closid, rmid} fields are updated: the targeted
task may have already been on its way to return to userspace, or the
updating thread could be preempted before fiddling with task_struct.

Update the task_struct's {closid, rmid} tuple *before* invoking
task_work_add(). Highlight the required ordering with a pair of
smp_mb__after_atomic().

Signed-off-by: default avatarValentin Schneider <valentin.schneider@arm.com>
parent 93bbb448
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment