[libvirt] [PATCH 2/2] virDomainFormatSchedDef: Check @schedMap bounds
Peter Krempa
pkrempa at redhat.com
Wed Feb 10 10:57:09 UTC 2016
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 at redhat.com>
> ---
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160210/c71d83ad/attachment-0001.sig>
More information about the libvir-list
mailing list