summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/amd/iommu.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@nvidia.com>2023-02-15 21:21:16 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-10 09:33:39 +0100
commit4c23124b45ee0aa895ed8d5d08871ae6b15ee336 (patch)
tree7082b79cad926251d5e37b94d41323a9f840f782 /drivers/iommu/amd/iommu.c
parent24278dc380aab6a1aef0a75317f57ad4c2453cf6 (diff)
downloadlinux-stable-4c23124b45ee0aa895ed8d5d08871ae6b15ee336.tar.gz
linux-stable-4c23124b45ee0aa895ed8d5d08871ae6b15ee336.tar.bz2
linux-stable-4c23124b45ee0aa895ed8d5d08871ae6b15ee336.zip
iommu: Fix error unwind in iommu_group_alloc()
[ Upstream commit 4daa861174d56023c2068ddb03de0752f07fa199 ] If either iommu_group_grate_file() fails then the iommu_group is leaked. Destroy it on these error paths. Found by kselftest/iommu/iommufd_fail_nth Fixes: bc7d12b91bd3 ("iommu: Implement reserved_regions iommu-group sysfs file") Fixes: c52c72d3dee8 ("iommu: Add sysfs attribyte for domain type") Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com> Link: https://lore.kernel.org/r/0-v1-8f616bee028d+8b-iommu_group_alloc_leak_jgg@nvidia.com Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/iommu/amd/iommu.c')
0 files changed, 0 insertions, 0 deletions