Commit 32ea2c5
iommu/arm-smmu-v3: Don't unregister on shutdown
Similar to SMMUv2, this driver calls iommu_device_unregister() from the
shutdown path, which removes the IOMMU groups with no coordination
whatsoever with their users - shutdown methods are optional in device
drivers. This can lead to NULL pointer dereferences in those drivers'
DMA API calls, or worse.
Instead of calling the full arm_smmu_device_remove() from
arm_smmu_device_shutdown(), let's pick only the relevant function call -
arm_smmu_device_disable() - more or less the reverse of
arm_smmu_device_reset() - and call just that from the shutdown path.
Fixes: 57365a0 ("iommu: Move bus setup to IOMMU device registration")
Suggested-by: Robin Murphy <[email protected]>
Signed-off-by: Vladimir Oltean <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>1 parent ce31e6c commit 32ea2c5
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3858 | 3858 | | |
3859 | 3859 | | |
3860 | 3860 | | |
3861 | | - | |
| 3861 | + | |
| 3862 | + | |
| 3863 | + | |
3862 | 3864 | | |
3863 | 3865 | | |
3864 | 3866 | | |
| |||
0 commit comments