HomeFreeBSD

arm64/iommu: Fix a resource leak in smmu_domain_alloc()

Description

arm64/iommu: Fix a resource leak in smmu_domain_alloc()

We should free the allocated ASID if smmu_init_cd() fails.

Move the allocation of "domain" to simplify the first error path.

Reported by: Kevin Day <kevin@your.org>
Reviewed by: br
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54676

(cherry picked from commit 6740cccb1eff2a0e1e6d451fa9676a21736937d2)

Details

Provenance
markjAuthored on Jan 15 2026, 2:04 PM
Reviewer
br
Differential Revision
D54676: arm64/iommu: Fix a resource leak in smmu_domain_alloc()
Parents
rG6cbd76e9d02f: jme: Convert driver to CTLFLAG_MPSAFE
Branches
Unknown
Tags
Unknown