diff options
| author | Shameer Kolothum <skolothumtho@nvidia.com> | 2026-06-29 10:41:05 +0100 |
|---|---|---|
| committer | Will Deacon <will@kernel.org> | 2026-07-22 13:25:29 +0000 |
| commit | 2bd22a0d40503a65d243b011de146603c8ce1cbc (patch) | |
| tree | 3dd5bdcb7c825289a0507e6619583954c1203dcc /tools/perf/scripts/python | |
| parent | 4455286274474e95f223c68c215d32c864404889 (diff) | |
iommu/arm-smmu-v3: Manage teardown with devm
arm_smmu_device_remove() manually frees the IOPF queue, destroys the
vmid_map and disables the device, while the IRQs and queues are devm
managed. devm unwinds only after remove() returns, so the cleanup runs
in the wrong order. The IOPF queue is freed before the event-queue IRQ
whose handler uses it.
Manage all of it with devm so the unwind order is correct. Free the IOPF
queue and vmid_map via devm actions, and disable the device from one
registered after arm_smmu_device_reset().
This is also a prerequisite for fixing a Tegra241 CMDQV CMD_SYNC
use-after-free in the subsequent patch.
Cc: stable@vger.kernel.org
Suggested-by: Jason Gunthorpe <jgg@ziepe.ca>
Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Shameer Kolothum <skolothumtho@nvidia.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
