summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@nvidia.com>2026-05-12 19:46:15 +0300
committerJoerg Roedel <joerg.roedel@amd.com>2026-05-15 08:29:16 +0300
commit0735c54804c709d1b292f3b6947cfb560b2ce552 (patch)
tree0234d43ca5bb7d0b91744e7567a80ec90642183f /drivers/gpu
parentb948a87228482235afbaf5f4d8037860b5c470fd (diff)
downloadlinux-0735c54804c709d1b292f3b6947cfb560b2ce552.tar.xz
iommu: Handle unmap error when iommu_debug is enabled
Sashiko noticed a latent bug where the map error flow called iommu_unmap() which calls iommu_debug_unmap_begin()/iommu_debug_unmap_end() however since this is an error path the map flow never actually established the original iommu_debug_map() it will malfunction. Lift the unmap error handling into iommu_map_nosync() and reorder it so the trace_map()/iommu_debug_map() records the partial mapping and then immediately unmaps it. This avoid creating the unbalanced tracking and provides saner tracing instead of a unmap unmatched to any map. Fixes: ccc21213f013 ("iommu: Add calls for IOMMU_DEBUG_PAGEALLOC") Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Pranjal Shrivastava <praan@google.com> Reviewed-by: Samiullah Khawaja <skhawaja@google.com> Reviewed-by: Mostafa Saleh <smostafa@google.com> Tested-by: Josua Mayer <josua@solid-run.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'drivers/gpu')
0 files changed, 0 insertions, 0 deletions