All of lore.kernel.org
 help / color / mirror / Atom feed
* barriers before {req/rsp}_cons = cons?
@ 2008-07-18 18:52 Samuel Thibault
  2008-07-18 19:31 ` Keir Fraser
  0 siblings, 1 reply; 6+ messages in thread
From: Samuel Thibault @ 2008-07-18 18:52 UTC (permalink / raw)
  To: xen-devel

Hello,

In a bunch of places, one can read code like

cons = netif->tx.req_cons;
rmb(); /* Ensure that we see the request before we copy it. */
memcpy(&txreq, RING_GET_REQUEST(&netif->tx, i), sizeof(txreq));
some checks
netif->tx.req_cons = ++cons;

Shouldn't there be a full barrier just before the req_cons assignation?
I guess we are currently not seeing bugs at least because the req will
not be overwriten until we loop in the ring, but it seems to me there
may be a bug here.

Samuel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-07-21 10:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-18 18:52 barriers before {req/rsp}_cons = cons? Samuel Thibault
2008-07-18 19:31 ` Keir Fraser
2008-07-18 19:33   ` Samuel Thibault
2008-07-18 19:34     ` Samuel Thibault
2008-07-21  8:28     ` Keir Fraser
2008-07-21 10:08       ` Samuel Thibault

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.