Re: [PATCH] dmaengine: idxd: Fix passing freed memory in idxd_cdev_open()

From: Vinod Koul
Date: Tue May 16 2023 - 13:51:11 EST


On 08-05-23, 23:07, Harshit Mogalapalli wrote:
> Smatch warns:
> drivers/dma/idxd/cdev.c:327:
> idxd_cdev_open() warn: 'sva' was already freed.
>
> When idxd_wq_set_pasid() fails, the current code unbinds sva and then
> goes to 'failed_set_pasid' where iommu_sva_unbind_device is called
> again causing the above warning.
> [ device_user_pasid_enabled(idxd) is still true when calling
> failed_set_pasid ]

Applied, thanks

--
~Vinod