iommu: Fix SVA, iommufd, and iommupt error paths
Status from this message: Applied, thanks.
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | iommu/sva: Set handle->dev before the SVA handle is visibledrivers/ | +1 | 3 replies | |
| 2/4 | iommufd: Avoid locking internal accesses during unmapdrivers/ | +2 | 1 reply | |
| 3/4 | iommufd: Release current IOAS on xa_store() failuredrivers/ | +2 | 1 reply | |
| 4/4 | iommupt: Return zero for invalid iova_to_phys() rangesdrivers/ | +1 | 2 replies |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Kevin Tian | Lu Baolu | Jason Gunthorpe |
|---|---|---|---|
| Series | R-b | ||
| 1/4 | R-b | R-b | |
| 2/4 | R-b | ||
| 3/4 | R-b | ||
| 4/4 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH 0/4] iommu: Fix SVA, iommufd, and iommupt error paths
This series fixes four independent error-path/lifetime issues in the IOMMU core helpers, iommufd, and generic page table code.
Patch 1 fixes an SVA race where an attach handle becomes visible before handle->dev is initialized. A racing bind can reuse the handle and later unbind can dereference a NULL handle->dev.
Patches 2 and 3 fix iommufd reference/lock leaks. Patch 2 avoids taking an object reference for internal accesses that are skipped by the unmap notification path. Patch 3 releases the current IOAS rwsem and object reference if xa_store() fails before the IOAS is inserted into the unwind list.
Patch 4 fixes the generic page table iova_to_phys() op to return 0 on range validation failures. Returning a negative errno from a phys_addr_t function can make callers consume a bogus physical address.
All patches are small fixes with Fixes tags and Cc: stable.
Shuai Xue (4):
iommu/sva: Set handle->dev before the SVA handle is visible
iommufd: Avoid locking internal accesses during unmap
iommufd: Release current IOAS on xa_store() failure
iommupt: Return zero for invalid iova_to_phys() ranges
drivers/iommu/generic_pt/iommu_pt.h | 2 +- drivers/iommu/iommu-sva.c | 2 +- drivers/iommu/iommufd/device.c | 4 ++-- drivers/iommu/iommufd/ioas.c | 2 ++ 4 files changed, 6 insertions(+), 4 deletions(-)
Signature · 1 line
2.39.3