Messages in this thread | | | Date | Tue, 17 Oct 2023 15:14:35 +0200 | From | Peter Zijlstra <> | Subject | Re: [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().
| |