RE: [PATCH v1 1/3] iommufd/viommu: Release the igroup lock on the vdevice_size error path

From: Tian, Kevin

Date: Fri Jul 03 2026 - 02:32:29 EST


> From: Nicolin Chen <nicolinc@xxxxxxxxxx>
> Sent: Tuesday, June 30, 2026 5:16 AM
>
> iommufd_vdevice_alloc_ioctl() takes idev->igroup->lock, then validates the
> driver's vdevice_size against the core structure size with a WARN_ON_ONCE.
> On failure that guard jumps to out_put_idev, below out_unlock_igroup, so it
> skips the mutex_unlock(), leaving the igroup lock held and deadlocking the
> next vDEVICE operation on that group.
>
> Jump to out_unlock_igroup instead.
>
> Fixes: ed42eee797ff3 ("iommufd/viommu: Add driver-defined vDEVICE
> support")
> Cc: stable@xxxxxxxxxxxxxxx
> Assisted-by: Claude:claude-opus-4-8
> Signed-off-by: Nicolin Chen <nicolinc@xxxxxxxxxx>

Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>