vfio/spapr: Fix missing mutex unlock when creating a window
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Wed, 1 Feb 2017 03:26:16 +0000 (14:26 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 Dec 2017 21:01:54 +0000 (22:01 +0100)
commit3e550debcf7557ca966388d5462519063aa75524
tree9f3a202054530f7f8806db6288dd4e726df17ae8
parent6129fd98822520dccf60389a4e2ef5d0148aad78
vfio/spapr: Fix missing mutex unlock when creating a window

[ Upstream commit 2da64d20a0b20046d688e44f4033efd09157e29d ]

Commit d9c728949ddc ("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: d9c728949ddc ("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>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/vfio/vfio_iommu_spapr_tce.c