mirror of
https://github.com/torvalds/linux.git
synced 2024-11-12 07:01:57 +00:00
vfio/spapr: Fix missing mutex unlock when creating a window
Commitd9c728949d
("vfio/spapr: Postpone default window creation") added an additional exit to the VFIO_IOMMU_SPAPR_TCE_CREATE case and made it possible to return from tce_iommu_ioctl() without unlocking container->lock; this fixes the issue. Fixes:d9c728949d
("vfio/spapr: Postpone default window creation") Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
parent
566cf877a1
commit
2da64d20a0
@ -1123,10 +1123,9 @@ static long tce_iommu_ioctl(void *iommu_data,
|
||||
mutex_lock(&container->lock);
|
||||
|
||||
ret = tce_iommu_create_default_window(container);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = tce_iommu_create_window(container, create.page_shift,
|
||||
if (!ret)
|
||||
ret = tce_iommu_create_window(container,
|
||||
create.page_shift,
|
||||
create.window_size, create.levels,
|
||||
&create.start_addr);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user