Re: [PATCH v2 01/12] qemu: refactor blockinfo job handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/16/14 09:04, Eric Blake wrote:
> In order for a future patch to virDomainListGetStats to reuse
> some code for determining disk usage of offline domains, we
> need to make it easier to pull out part of the guts of grabbing
> blockinfo.  The current implementation grabs a job fairly late
> in the game, while getstats will already own a job; reordering
> things so that the job is always grabbed up front in both
> functions will make it easier to pull out the common code.
> This patch results in grabbing a job in cases where one was not
> previously needed, but as it is a query job, it should not be
> noticeably slower.
> 
> This patch touches the same code as the fix for CVE-2014-6458
> (commit b799259); in that patch, we avoided hotplug changing
> a disk reference during the time of obtaining a monitor lock
> by copying all data we needed and no longer referencing disk;
> this patch goes the other way and ensures that by holding the
> job, the disk cannot be changed so we no longer need to worry
> about the disk being invalidated across the monitor lock.
> 
> * src/qemu/qemu_driver.c (qemuDomainGetBlockInfo): Rearrange job
> control to be outside of disk information.
> 
> Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
> ---
>  src/qemu/qemu_driver.c | 65 ++++++++++++++++++++++++--------------------------
>  1 file changed, 31 insertions(+), 34 deletions(-)
> 

ACK,

Peter


Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]