|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] barriers before {req/rsp}_cons = cons?
Could you describe the race you believe is made possible by the absence of
the barrier?
-- Keir
On 18/7/08 19:52, "Samuel Thibault" <samuel.thibault@xxxxxxxxxxxxx> wrote:
> 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
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|