lkml.org 
[lkml]   [2023]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] stop_machine: Avoid potential race behaviour of multi_stop_data::state
On Tue, Oct 17, 2023 at 11:24:40AM +0100, Mark Rutland wrote:

> That said, if we really want to avoid the non-atomic read, it's probably better
> to have multi_cpu_stop() pass curstate as a paramter to ack_state. That or fold
> ack_state() into multi_cpu_stop() and use curstate directly.

Right. Also, that smp_wmb() needs a comment. Or perhaps
smp_store_release().

\
 
 \ /
  Last update: 2023-10-17 15:15    [W:0.420 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site