]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
iommu: Restore lost return in iommu_report_device_fault()
authorBarak Biber <bbiber@nvidia.com>
Thu, 1 Aug 2024 12:26:04 +0000 (09:26 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Aug 2024 15:35:51 +0000 (17:35 +0200)
[ Upstream commit fca5b78511e98bdff2cdd55c172b23200a7b3404 ]

When iommu_report_device_fault gets called with a partial fault it is
supposed to collect the fault into the group and then return.

Instead the return was accidently deleted which results in trying to
process the fault and an eventual crash.

Deleting the return was a typo, put it back.

Fixes: 3dfa64aecbaf ("iommu: Make iommu_report_device_fault() return void")
Signed-off-by: Barak Biber <bbiber@nvidia.com>
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-e7153d9c8cee+1c6-iommu_fault_fix_jgg@nvidia.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iommu/io-pgfault.c

index 06d78fcc79fdb6818af10d37b3a23f8cb0ae6b31..f2c87c695a17cfd73faeef7eb6b24f9236b5bc00 100644 (file)
@@ -192,6 +192,7 @@ void iommu_report_device_fault(struct device *dev, struct iopf_fault *evt)
                report_partial_fault(iopf_param, fault);
                iopf_put_dev_fault_param(iopf_param);
                /* A request that is not the last does not need to be ack'd */
+               return;
        }
 
        /*