Re: [PATCH v5 03/18] rcu/tree: Use READ_ONCE() for lockless read of rnp->qsmask

From: Joel Fernandes
Date: Tue Sep 06 2022 - 18:32:09 EST




On 9/6/2022 6:26 PM, Boqun Feng wrote:
> On Thu, Sep 01, 2022 at 10:17:05PM +0000, Joel Fernandes (Google) wrote:
>> The rnp->qsmask is locklessly accessed from rcutree_dying_cpu(). This
>> may help avoid load/store tearing due to concurrent access, KCSAN
>
> Nit: you can avoid only load tearing with READ_ONCE().
>

I modified it as you suggested for the next revision, thanks.