Re: [PATCH kernel] vfio-pci: Add missing break to enable VFIO_PCI_ERR_IRQ_INDEX

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

 



On Thu, 2015-03-12 at 14:43 +1100, Alexey Kardashevskiy wrote:
> This adds a missing break statement to VFIO_DEVICE_SET_IRQS handler
> without which vfio_pci_set_err_trigger() would never be called.
> 
> While we are here, add another "break" to VFIO_PCI_REQ_IRQ_INDEX case
> so if we add more indexes later, we won't miss it.
> 
> Signed-off-by: Alexey Kardashevskiy <aik@xxxxxxxxx>
> ---
>  drivers/vfio/pci/vfio_pci_intrs.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/vfio/pci/vfio_pci_intrs.c b/drivers/vfio/pci/vfio_pci_intrs.c
> index f88bfdf..2027a27 100644
> --- a/drivers/vfio/pci/vfio_pci_intrs.c
> +++ b/drivers/vfio/pci/vfio_pci_intrs.c
> @@ -868,12 +868,14 @@ int vfio_pci_set_irqs_ioctl(struct vfio_pci_device *vdev, uint32_t flags,
>  				func = vfio_pci_set_err_trigger;
>  			break;
>  		}
> +		break;
>  	case VFIO_PCI_REQ_IRQ_INDEX:
>  		switch (flags & VFIO_IRQ_SET_ACTION_TYPE_MASK) {
>  		case VFIO_IRQ_SET_ACTION_TRIGGER:
>  			func = vfio_pci_set_req_trigger;
>  			break;
>  		}
> +		break;
>  	}
>  
>  	if (!func)

Whoops, that's no good.  Added to my for-linus branch for v4.0.  Thanks
for the fix!

Alex

--
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