Commit 5df0e734 authored by Vishnu Dasa's avatar Vishnu Dasa Committed by Greg Kroah-Hartman

VMCI: Check exclusive_vectors when freeing interrupt 1

free_irq() may be called to free an interrupt that was not
allocated.  Add missing 'if' statement to check for
exclusive_vectors when freeing interrupt 1.

Fixes: cc68f217 ("VMCI: dma dg: register dummy IRQ handlers for DMA datagrams")
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarBryan Tan <bryantan@vmware.com>
Reviewed-by: default avatarRajesh Jalisatgi <rjalisatgi@vmware.com>
Signed-off-by: default avatarVishnu Dasa <vdasa@vmware.com>
Link: https://lore.kernel.org/r/20220318055843.30606-1-vdasa@vmware.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e70bcbcf
...@@ -862,7 +862,9 @@ static int vmci_guest_probe_device(struct pci_dev *pdev, ...@@ -862,7 +862,9 @@ static int vmci_guest_probe_device(struct pci_dev *pdev,
return 0; return 0;
err_free_bm_irq: err_free_bm_irq:
free_irq(pci_irq_vector(pdev, 1), vmci_dev); if (vmci_dev->exclusive_vectors)
free_irq(pci_irq_vector(pdev, 1), vmci_dev);
err_free_irq: err_free_irq:
free_irq(pci_irq_vector(pdev, 0), vmci_dev); free_irq(pci_irq_vector(pdev, 0), vmci_dev);
tasklet_kill(&vmci_dev->datagram_tasklet); tasklet_kill(&vmci_dev->datagram_tasklet);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment