mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-03 23:37:40 -04:00
Merge tag 'vfio-v7.0-rc6' of https://github.com/awilliam/linux-vfio
Pull VFIO fix from Alex Williamson: - Fix double-free and reference count underflow if dma-buf file allocation fails (Alex Williamson) * tag 'vfio-v7.0-rc6' of https://github.com/awilliam/linux-vfio: vfio/pci: Fix double free in dma-buf feature
This commit is contained in:
@@ -301,11 +301,10 @@ int vfio_pci_core_feature_dma_buf(struct vfio_pci_core_device *vdev, u32 flags,
|
||||
*/
|
||||
ret = dma_buf_fd(priv->dmabuf, get_dma_buf.open_flags);
|
||||
if (ret < 0)
|
||||
goto err_dma_buf;
|
||||
dma_buf_put(priv->dmabuf);
|
||||
|
||||
return ret;
|
||||
|
||||
err_dma_buf:
|
||||
dma_buf_put(priv->dmabuf);
|
||||
err_dev_put:
|
||||
vfio_device_put_registration(&vdev->vdev);
|
||||
err_free_phys:
|
||||
|
||||
Reference in New Issue
Block a user