[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <04C1E631-725C-47AD-9914-25D5CE04DFF4@gmail.com>
Date: Fri, 21 Jul 2023 02:53:53 +0800
From: Alan Huang <mmpgouride@...il.com>
To: linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
rcu@...r.kernel.org
Cc: "Paul E. McKenney" <paulmck@...nel.org>,
Eric Dumazet <edumazet@...gle.com>, roman.gushchin@...ux.dev
Subject: Question about the barrier() in hlist_nulls_for_each_entry_rcu()
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)?
[1] https://lore.kernel.org/all/1369699930.3301.494.camel@edumazet-glaptop/
Thanks,
Alan
Powered by blists - more mailing lists