Re: [PATCH] kvm: svm: fix unsigned compare less than zero comparison

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

 



On Mon, Sep 19, 2016 at 07:11:59AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
> 
> vm_data->avic_vm_id is a u32, so the check for a error
> return (less than zero) such as -EAGAIN from
> avic_get_next_vm_id currently has no effect whatsoever.
> Fix this by using a temporary int for the comparison
> and assign vm_data->avic_vm_id to this. I used an explicit
> u32 cast in the assignment to show why vm_data->avic_vm_id
> cannot be used in the assign/compare steps.
> 
> Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>

Acked-by: Joerg Roedel <jroedel@xxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux