Thread (12 messages) 12 messages, 4 authors, 2009-07-01

Re: [PATCH] net: fix race in the receive/select

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2009-07-01 13:08:19
Also in: lkml

Possibly related (same subject, not in this thread)

On Wed, Jul 01, 2009 at 06:58:52PM +0800, Herbert Xu wrote:
It would be good to know whether this bug occurs on the upstream
kernel because as it stands, the patch is a no-op for the upstream
kernel on x86-64.
I take that back.  Andi, please look at section 8.2.3.4 of the
IA-32 Architectures Software Developer's Manual Volume 3A, "Loads
May Be Reordered with Earlier Stores to Different Locations.
This seems to be exactly the scenario that we have here, and shows
why mfence is required.

In our case, we're doing

CPU1					CPU2
Write data ready			Add ourselves to wait queue
Read wait queue to notify		Check data ready

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help