Skip to content

iommu/amd: Locking Fixes

Joerg Roedel linux-iommu 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 15 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6iommu/amd: Remove domain->updateddrivers/iommu/amd_iommu.c drivers/iommu/amd_iommu_types.h+25 -252 replies
2/6iommu/amd: Remove amd_iommu_devtable_lockdrivers/iommu/amd_iommu.c+6 -173 replies
3/6iommu/amd: Take domain->lock for complete attach/detach pathdrivers/iommu/amd_iommu.c+26 -392 replies
4/6iommu/amd: Check for busy devices earlier in attach_device()drivers/iommu/amd_iommu.c+7 -182 replies
5/6iommu/amd: Lock dev_data in attach/detach code pathsdrivers/iommu/amd_iommu.c drivers/iommu/amd_iommu_types.h+12 -02 replies
6/6iommu/amd: Lock code paths traversing protection_domain->dev_listdrivers/iommu/amd_iommu.c+24 -12 replies

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchFilippo SironiJerry Snitselaar
1/6R-b R-b
2/6R-b R-b
3/6R-b R-b
4/6R-b R-b
5/6R-b R-b
6/6R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/6] iommu/amd: Locking Fixes

Hi,

here are a couple of fixes for the amd iommu driver to fix a few locking issues around protection-domains. Main problem was that some traversals of ->dev_list were not locked in any form, causing potential race conditions.

But there are more issues fixed here, for example the racy access to protection_domain->updated and races in the attach/detach_device code paths.

Changes are boot-tested with lockdep enabled, looked all good so far.

Please review.

Thanks,

Joerg

Joerg Roedel (6):
iommu/amd: Remove domain->updated
iommu/amd: Remove amd_iommu_devtable_lock
iommu/amd: Take domain->lock for complete attach/detach path iommu/amd: Check for busy devices earlier in attach_device() iommu/amd: Lock dev_data in attach/detach code paths iommu/amd: Lock code paths traversing protection_domain->dev_list

 drivers/iommu/amd_iommu.c       | 166 ++++++++++++++++----------------
 drivers/iommu/amd_iommu_types.h |   4 +-
 2 files changed, 85 insertions(+), 85 deletions(-)
Signature · 6 lines
2.17.1

_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu