aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/xen-netback/netback.c
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@citrix.com>2015-10-30 14:58:08 +0000
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2015-12-18 10:00:17 -0500
commit454d5d882c7e412b840e3c99010fe81a9862f6fb (patch)
treed5365a0ffb5807285da7af3834b6a73c8531d9bd /drivers/net/xen-netback/netback.c
parentxen/x86/pvh: Use HVM's flush_tlb_others op (diff)
downloadlinux-dev-454d5d882c7e412b840e3c99010fe81a9862f6fb.tar.xz
linux-dev-454d5d882c7e412b840e3c99010fe81a9862f6fb.zip
xen: Add RING_COPY_REQUEST()
Using RING_GET_REQUEST() on a shared ring is easy to use incorrectly (i.e., by not considering that the other end may alter the data in the shared ring while it is being inspected). Safe usage of a request generally requires taking a local copy. Provide a RING_COPY_REQUEST() macro to use instead of RING_GET_REQUEST() and an open-coded memcpy(). This takes care of ensuring that the copy is done correctly regardless of any possible compiler optimizations. Use a volatile source to prevent the compiler from reordering or omitting the copy. This is part of XSA155. CC: stable@vger.kernel.org Signed-off-by: David Vrabel <david.vrabel@citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions