stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [patch] KVM: return an error code in kvm_vm_ioctl_register_coalesced_mmio()
       [not found] <20140129131639.GB10678@elgon.mountain>
@ 2014-01-30 10:57 ` Paolo Bonzini
  0 siblings, 0 replies; only message in thread
From: Paolo Bonzini @ 2014-01-30 10:57 UTC (permalink / raw)
  To: Dan Carpenter, Gleb Natapov; +Cc: kvm, kernel-janitors, stable

Il 29/01/2014 14:16, Dan Carpenter ha scritto:
> If kvm_io_bus_register_dev() fails then it returns success but it should
> return an error code.
>
> I also did a little cleanup like removing an impossible NULL test.
>
> Fixes: 2b3c246a682c ('KVM: Make coalesced mmio use a device per zone')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/virt/kvm/coalesced_mmio.c b/virt/kvm/coalesced_mmio.c
> index 88b2fe3ddf42..00d86427af0f 100644
> --- a/virt/kvm/coalesced_mmio.c
> +++ b/virt/kvm/coalesced_mmio.c
> @@ -154,17 +154,13 @@ int kvm_vm_ioctl_register_coalesced_mmio(struct kvm *kvm,
>  	list_add_tail(&dev->list, &kvm->coalesced_zones);
>  	mutex_unlock(&kvm->slots_lock);
>
> -	return ret;
> +	return 0;
>
>  out_free_dev:
>  	mutex_unlock(&kvm->slots_lock);
> -
>  	kfree(dev);
>
> -	if (dev == NULL)
> -		return -ENXIO;
> -
> -	return 0;
> +	return ret;
>  }
>
>  int kvm_vm_ioctl_unregister_coalesced_mmio(struct kvm *kvm,
>

Applying to kvm/master, and adding a "Cc: stable@vger.kernel.org" while 
at it.

Paolo

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-01-30 10:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20140129131639.GB10678@elgon.mountain>
2014-01-30 10:57 ` [patch] KVM: return an error code in kvm_vm_ioctl_register_coalesced_mmio() Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).