(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

iommu/vt-d: Drop old iopf ref only after attach succeeds

identity_domain_attach_dev() currently removes the old domain’s iopf reference before programming pass-through. If pass-through setup fails, attach fails but the old domain is still effectively attached — now with its IOPF ref already dropped. This can undercount info->iopf_refcount and may disable iopf queue handling while the old domain can still issue page requests. Fix it by removing the old domain’s iopf reference only after pass-through setup succeeds, matching other attach paths. Fixes: 236dd58fabd2 ("iommu/vt-d: Fix iopf_refcount leak on RID domain replacement") Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>


Author Lu Baolu Committer Joerg Roedel Date Commit Parent 83871c3a
+10 -9
1 changed file
+10 -9
1 changed file