diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-03 15:38:53 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-03 15:38:53 -0800 |
commit | e9f7f17d53003ee46ccbaf057f7820bfb6e76b9d (patch) | |
tree | 146416492df5659e125695158c47b697fd969775 | |
parent | 7a92cc6bcbc90bf72e57eff2dc29900a636c2d0d (diff) | |
parent | 2da64d20a0b20046d688e44f4033efd09157e29d (diff) |
Merge tag 'vfio-v4.10-rc7' of git://github.com/awilliam/linux-vfio
Pull VFIO fix from Alex Williamson:
"Fix an error path in SPAPR IOMMU backend (Alexey Kardashevskiy)"
* tag 'vfio-v4.10-rc7' of git://github.com/awilliam/linux-vfio:
vfio/spapr: Fix missing mutex unlock when creating a window
-rw-r--r-- | drivers/vfio/vfio_iommu_spapr_tce.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/vfio/vfio_iommu_spapr_tce.c b/drivers/vfio/vfio_iommu_spapr_tce.c index 128d10282d16..7690e5bf3cf1 100644 --- a/drivers/vfio/vfio_iommu_spapr_tce.c +++ b/drivers/vfio/vfio_iommu_spapr_tce.c @@ -1123,12 +1123,11 @@ 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, - create.window_size, create.levels, - &create.start_addr); + if (!ret) + ret = tce_iommu_create_window(container, + create.page_shift, + create.window_size, create.levels, + &create.start_addr); mutex_unlock(&container->lock); |