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:
Valentin Schneider <valentin.schneider@arm.com>
Loading
Please register or sign in to comment