[PATCH v1 1/3] iommufd/viommu: Release the igroup lock on the vdevice_size error path
Tian, Kevin
kevin.tian at intel.com
Thu Jul 2 23:32:15 PDT 2026
> From: Nicolin Chen <nicolinc at nvidia.com>
> 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 at vger.kernel.org
> Assisted-by: Claude:claude-opus-4-8
> Signed-off-by: Nicolin Chen <nicolinc at nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian at intel.com>
More information about the linux-arm-kernel
mailing list