On Wed, Aug 12, 2009 at 09:01:35AM -0400, Gregory Haskins wrote:
Yes.
Here's a thesis on what rcu_dereference does (besides documentation):
reader does this
A: sock = n->sock
B: use *sock
Say writer does this:
C: newsock = allocate socket
D: initialize(newsock)
E: n->sock = newsock
F: flush
On Alpha, reads could be reordered. So, on smp, command A could get
data from point F, and command B - from point D (uninitialized, from
cache). IOW, you get fresh pointer but stale data.
So we need to stick a barrier in there.
Heh, if readers are lockless and writer does init/update/sync,
this to me spells rcu.
--
MST
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html