Re: [PATCH 2/2] virDomainFormatSchedDef: Check @schedMap bounds

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

 



On Wed, Feb 10, 2016 at 11:37:38 +0100, Michal Privoznik wrote:
> In the function, @schedMap is a bitmap used to track pinning of
> scheduling units (e.g. vcpu, iothreads). However, as a corner
> case it may happen that it's empty but the scheduler is set to
> either RR or FIFO. If that's the case we may get -1 when asking
> for the next bit set in @schedMap and proceed with that. The code

This is not true. The parent loop condition checks that the bitmap is
not empty thus -1 will never be returned.

> is able to deal with that because we are ignoring some errors
> afterwards, but it's safer to check upfront.
> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  src/conf/domain_conf.c | 21 +++++++++++----------
>  1 file changed, 11 insertions(+), 10 deletions(-)
> 

NACK, that is a false positive and the code you are adding is dead code.

Peter

Attachment: signature.asc
Description: 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]