Commit f321b6fa authored by Barak Biber's avatar Barak Biber Committed by Lin Ruifeng
Browse files

iommu: Restore lost return in iommu_report_device_fault()

stable inclusion
from stable-v6.10.7
commit cc6bc2ab1663ec9353636416af22452b078510e9
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAOXZS
CVE: CVE-2024-44994

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=cc6bc2ab1663ec9353636416af22452b078510e9



--------------------------------

[ 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: default avatarBarak Biber <bbiber@nvidia.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Reviewed-by: default avatarLu 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: default avatarJoerg Roedel <jroedel@suse.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarLin Ruifeng <linruifeng4@huawei.com>
parent 2e4beeb3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
	}

	/*