Eric Biggers <[email protected]> wrote: > From: Eric Biggers <[email protected]> > > When a CPU selects which CRNG to use, it accesses crng_node_pool without > a memory barrier. That's wrong, because crng_node_pool can be set by > another CPU concurrently. Without a memory barrier, the crng_state that > is used might not appear to be fully initialized.
The only architecture that requires a barrier for data dependency is Alpha. The correct primitive to ensure that barrier is present is smp_barrier_depends, or you could just use READ_ONCE. Cheers, -- Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
