]> xenbits.xensource.com Git - qemu-upstream-4.3-testing.git/commit
xen/blkif: Avoid double access to src->nr_segments
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 18 Dec 2015 15:44:58 +0000 (15:44 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 18 Dec 2015 15:52:06 +0000 (15:52 +0000)
commitca37f03bc0df4d4a2c5aef4c3c445a183e6bd11b
tree3fea0072f7e053ef73f89a5c661bc8f35f9692db
parentb188780861662e8cf1847ec562799b32bb44f05e
xen/blkif: Avoid double access to src->nr_segments

src is stored in shared memory and src->nr_segments is dereferenced
twice at the end of the function.  If a compiler decides to compile this
into two separate memory accesses then the size limitation could be
bypassed.

Fix it by removing the double access to src->nr_segments.

This is part of XSA-155.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
hw/xen_blkif.h