VMCI: Release notification_bitmap in error path
Subsystems (3)
PATCH RESEND 1/1 VMCI: Release notification_bitmap in error path
From: Vishnu Dasa <[email protected]>
notification_bitmap may not be released when VMCI_CAPS_DMA_DATAGRAM capability is missing from the device. Add missing 'err_free_notification_bitmap' label and use it instead of 'err_free_data_buffers' to avoid this.
Fixes eed2298d9360 ("VMCI: dma dg: detect DMA datagram capability")
Reported-by Dan Carpenter <[email protected]>
Reviewed-by Bryan Tan <[email protected]>
Reviewed-by Rajesh Jalisatgi <[email protected]>
Signed-off-by Vishnu Dasa <[email protected]>
--- drivers/misc/vmw_vmci/vmci_guest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/misc/vmw_vmci/vmci_guest.c +2 -1
@@ -720,7 +720,7 @@ static int vmci_guest_probe_device(struct pci_dev *pdev,dev_err (&pdev->dev,"Missing capability: VMCI_CAPS_DMA_DATAGRAM\n" ); error = -ENXIO ; - goto err_free_data_buffers; + goto err_free_notification_bitmap; } }
@@ -884,6 +884,7 @@ static int vmci_guest_probe_device(struct pci_dev *pdev, vmci_dev_g =NULL ;spin_unlock_irq (&vmci_dev_spinlock); +err_free_notification_bitmap:if (vmci_dev->notification_bitmap) {vmci_write_reg (vmci_dev,VMCI_CONTROL_RESET ,VMCI_CONTROL_ADDR ); dma_free_coherent(&pdev->dev, PAGE_SIZE,
Signature · 6 lines
2.25.1 _______________________________________________ Virtualization mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/virtualization