On Wed, Oct 29, 2025, at 18:50, Alex Mastro wrote: > On Mon, Oct 13, 2025 at 06:26:11PM +0300, Leon Romanovsky wrote: >> + /* >> + * dma_buf_fd() consumes the reference, when the file closes the dmabuf >> + * will be released. >> + */ >> + return dma_buf_fd(priv->dmabuf, get_dma_buf.open_flags); > > I think this still needs to unwind state on fd allocation error. Reference > ownership is only transferred on success. Yes, you are correct, i need to call to dma_buf_put() in case of error. I will fix. Thanks > >> + >> +err_dev_put: >> + vfio_device_put_registration(&vdev->vdev); >> +err_free_phys: >> + kfree(priv->phys_vec); >> +err_free_priv: >> + kfree(priv); >> +err_free_ranges: >> + kfree(dma_ranges); >> + return ret; >> +}
- Re: [PATCH v5 9/9] vfio/pci: Add dma-buf export support ... Jason Gunthorpe
- Re: [PATCH v5 9/9] vfio/pci: Add dma-buf export sup... Leon Romanovsky
- Re: [PATCH v5 9/9] vfio/pci: Add dma-buf export... Jason Gunthorpe
- Re: [PATCH v5 9/9] vfio/pci: Add dma-buf export sup... Jason Gunthorpe
- Re: [PATCH v5 9/9] vfio/pci: Add dma-buf export... Shuai Xue
- Re: [PATCH v5 9/9] vfio/pci: Add dma-buf ex... Jason Gunthorpe
- Re: [PATCH v5 9/9] vfio/pci: Add dma-buf export sup... David Matlack
- Re: [PATCH v5 9/9] vfio/pci: Add dma-buf export... Leon Romanovsky
- Re: [PATCH v5 9/9] vfio/pci: Add dma-buf ex... Alex Mastro
- Re: [PATCH v5 9/9] vfio/pci: Add dma-buf export sup... Leon Romanovsky
- Re: [PATCH v5 9/9] vfio/pci: Add dma-buf export sup... Samiullah Khawaja
- Re: [PATCH v5 9/9] vfio/pci: Add dma-buf export... Leon Romanovsky
- Re: [PATCH v5 9/9] vfio/pci: Add dma-buf ex... Jason Gunthorpe
- Re: [PATCH v5 9/9] vfio/pci: Add dma-buf export sup... Alex Williamson
- Re: [PATCH v5 9/9] vfio/pci: Add dma-buf export... Leon Romanovsky
