]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iommufd: Check the domain owner of the parent before creating a nesting domain
authorJason Gunthorpe <jgg@nvidia.com>
Thu, 29 Aug 2024 13:19:59 +0000 (10:19 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:33:10 +0000 (16:33 +0200)
commit8842412c277787ebf401b14649b49b6bb3c46e18
treedf432be09c03cb08b44be26362d1004eeb6c0c51
parentf6b8766fa3f70933ecfc216baee286ac273f2013
iommufd: Check the domain owner of the parent before creating a nesting domain

[ Upstream commit 73183ad6ea51029d04b098286dcee98d715015f1 ]

This check was missed, before we can pass a struct iommu_domain to a
driver callback we need to validate that the domain was created by that
driver.

Fixes: bd529dbb661d ("iommufd: Add a nested HW pagetable object")
Link: https://patch.msgid.link/r/0-v1-c8770519edde+1a-iommufd_nesting_ops_jgg@nvidia.com
Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iommu/iommufd/hw_pagetable.c