xen-netback: use RING_COPY_REQUEST() throughout
authorDavid Vrabel <david.vrabel@citrix.com>
Fri, 30 Oct 2015 15:17:06 +0000 (15:17 +0000)
committerWilly Tarreau <w@1wt.eu>
Mon, 6 Feb 2017 08:04:07 +0000 (09:04 +0100)
commit67434d33afc97f2f99b8889c110d190dedefda44
treef6de5fa91401f8a0c13257eb7c6ffcedeb779fc3
parent85fed7d24f020390aabb1b09e5fecfe5536bfb16
xen-netback: use RING_COPY_REQUEST() throughout

commit 68a33bfd8403e4e22847165d149823a2e0e67c9c upstream.

Instead of open-coding memcpy()s and directly accessing Tx and Rx
requests, use the new RING_COPY_REQUEST() that ensures the local copy
is correct.

This is more than is strictly necessary for guest Rx requests since
only the id and gref fields are used and it is harmless if the
frontend modifies these.

This is part of XSA155.

Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
[wt: adjustments for 3.10 : netbk_rx_meta instead of struct xenvif_rx_meta]

Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/net/xen-netback/netback.c