]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iommufd: Report unmapped bytes in the error path of iopt_unmap_iova_range
authorNicolin Chen <nicolinc@nvidia.com>
Thu, 10 Jul 2025 05:58:53 +0000 (22:58 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Aug 2025 16:41:36 +0000 (18:41 +0200)
commitd5d6b14d1bcd9f672540e9522767c8f6265f2df2
tree58bf813d8e624875a0816db4ce4c997f5b011fb2
parente52bbaa209ebff3bf7a10c17ba7d3e1d3cb0fe61
iommufd: Report unmapped bytes in the error path of iopt_unmap_iova_range

commit b23e09f9997771b4b739c1c694fa832b5fa2de02 upstream.

There are callers that read the unmapped bytes even when rc != 0. Thus, do
not forget to report it in the error path too.

Fixes: 8d40205f6093 ("iommufd: Add kAPI toward external drivers for kernel access")
Link: https://patch.msgid.link/r/e2b61303bbc008ba1a4e2d7c2a2894749b59fdac.1752126748.git.nicolinc@nvidia.com
Cc: stable@vger.kernel.org
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/iommufd/io_pagetable.c