summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-02-03 15:38:53 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-03 15:38:53 -0800
commite9f7f17d53003ee46ccbaf057f7820bfb6e76b9d (patch)
tree146416492df5659e125695158c47b697fd969775
parent7a92cc6bcbc90bf72e57eff2dc29900a636c2d0d (diff)
parent2da64d20a0b20046d688e44f4033efd09157e29d (diff)
downloadlinux-e9f7f17d53003ee46ccbaf057f7820bfb6e76b9d.tar.bz2
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.c11
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);