]> xenbits.xensource.com Git - qemu-xen-traditional.git/commit
blkif: Avoid double access to src->nr_segments
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 20 Nov 2015 15:56:00 +0000 (10:56 -0500)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 18 Dec 2015 14:55:17 +0000 (14:55 +0000)
commita82794b1d5a6da06062a333b1db404e2448345dd
tree37c3eb5ee6d4469a9f7bebdbc5e45b460485ec0d
parentb8bcb5e754881c4e6bee871a789c178fb5b00fcb
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>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
hw/xen_blkif.h