Re: [PATCH] dma: idxd: cdev: Fix uninitialized use of sva in idxd_cdev_open

From: Purva Yeshi
Date: Fri Apr 18 2025 - 04:34:01 EST


On 17/04/25 20:48, Vinod Koul wrote:

On Thu, 10 Apr 2025 16:32:16 +0530, Purva Yeshi wrote:
Fix Smatch-detected issue:
drivers/dma/idxd/cdev.c:321 idxd_cdev_open() error:
uninitialized symbol 'sva'.

'sva' pointer may be used uninitialized in error handling paths.
Specifically, if PASID support is enabled and iommu_sva_bind_device()
returns an error, the code jumps to the cleanup label and attempts to
call iommu_sva_unbind_device(sva) without ensuring that sva was
successfully assigned. This triggers a Smatch warning about an
uninitialized symbol.

[...]

Applied, thanks!

[1/1] dma: idxd: cdev: Fix uninitialized use of sva in idxd_cdev_open
commit: 97994333de2b8062d2df4e6ce0dc65c2dc0f40dc

Best regards,

Hi Vinod,

Thank you for applying the patch!

Best regards,
Purva