]> xenbits.xensource.com Git - qemu-upstream-4.6-testing.git/commit
xen/blkif: Avoid double access to src->nr_segments
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 18 Dec 2015 15:09:58 +0000 (15:09 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 18 Dec 2015 15:28:42 +0000 (15:28 +0000)
commitfdd64c7720b98af20c9e63ae04b868d06341bfdc
tree6deb9c313d44d41a906cc9001ae98bdd9b9e8db1
parent980dfcf5b8d8161871f81d1987b2f8ea5d7d4db9
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