Re: [PATCH] kvm: selftests: ucall: fix unsigned comparison

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

 



On 29/11/18 16:29, Andrew Jones wrote:
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Signed-off-by: Andrew Jones <drjones@xxxxxxxxxx>
> ---
>  tools/testing/selftests/kvm/lib/ucall.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/kvm/lib/ucall.c b/tools/testing/selftests/kvm/lib/ucall.c
> index 4777f9bb5194..e28bdd6b546c 100644
> --- a/tools/testing/selftests/kvm/lib/ucall.c
> +++ b/tools/testing/selftests/kvm/lib/ucall.c
> @@ -58,7 +58,7 @@ void ucall_init(struct kvm_vm *vm, ucall_type_t type, void *arg)
>  		start = 1ul << (vm->va_bits * 2 / 3);
>  		end = 1ul << vm->va_bits;
>  		step = 1ul << (vm->va_bits / 6);
> -		for (gpa = start; gpa >= 0; gpa -= step) {
> +		for (gpa = start; gpa > 0; gpa -= step) {
>  			if (ucall_mmio_init(vm, gpa & ~(vm->page_size - 1)))
>  				return;
>  		}
> 

Queued, thanks.

Paolo



[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