]> xenbits.xensource.com Git - qemu-upstream-4.4-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:44:58 +0000 (15:44 +0000)
commit75421c82154542e6855bbb98e6cccaacb4b8904c
tree382e316a29aaa70c9b73f17b99f58f9d56b8040f
parent5fe74249f5ab528fe84a26fa60438a6de4c787f0
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/block/xen_blkif.h