]> xenbits.xensource.com Git - qemu-upstream-4.5-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:35:44 +0000 (15:35 +0000)
commita83c1576bd330965784cfea72c7fc6e9b1838fdc
tree6a2677d9e348c47467852ee616b80301b1e47041
parente5a1bb22cfb307db909dbd3404c48e5bbeb9e66d
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