[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iKJWw7zUP-E_d=Yhaz=Qw0R3Ae7ULaGgrtsi1yf2pfpGg@mail.gmail.com>
Date: Thu, 20 Jul 2023 21:22:27 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Alan Huang <mmpgouride@...il.com>
Cc: linux-kernel@...r.kernel.org, netdev@...r.kernel.org, rcu@...r.kernel.org,
"Paul E. McKenney" <paulmck@...nel.org>, roman.gushchin@...ux.dev
Subject: Re: Question about the barrier() in hlist_nulls_for_each_entry_rcu()
On Thu, Jul 20, 2023 at 8:54 PM Alan Huang <mmpgouride@...il.com> wrote:
>
> Hi,
>
> I noticed a commit c87a124a5d5e(“net: force a reload of first item in hlist_nulls_for_each_entry_rcu”)
> and a related discussion [1].
>
> After reading the whole discussion, it seems like that ptr->field was cached by gcc even with the deprecated
> ACCESS_ONCE(), so my question is:
>
> Is that a compiler bug? If so, has this bug been fixed today, ten years later?
>
> What about READ_ONCE(ptr->field)?
Make sure sparse is happy.
Do you have a patch for review ?
>
>
> [1] https://lore.kernel.org/all/1369699930.3301.494.camel@edumazet-glaptop/
>
> Thanks,
> Alan
Powered by blists - more mailing lists