Skip to contentSkip to conversation

iommu: Restore lost return in iommu_report_device_fault()

PATCH Applied Jason Gunthorpe 3 participants 3 messages Aug 1, 2024 – Aug 2, 2024 IOMMU

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu: Restore lost return in iommu_report_device_fault()

From: Barak Biber <[email protected]>

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")
---
 drivers/iommu/io-pgfault.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iommu/io-pgfault.c +1 -0
index cd679c13752e00..81e9cc6e3164a4 100644
@@ -170,6 +170,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;
 	}
 
 	/*

base-commit: 8400291e289ee6b2bf9779ff1c83a291501f017b

Signature · 1 line
2.45.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Jason Gunthorpe

From: Barak Biber<[email protected]>

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

Quoted 8 lines

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")

Thanks,
baolu