diff options
author | 2024-11-05 12:04:26 -0800 | |
---|---|---|
committer | 2024-11-12 11:46:18 -0400 | |
commit | 86070569450eec1a3b6a358be90a99cab87aa425 (patch) | |
tree | 5b56731eae8f3d0cc008b24b7bcf7acdf83c8f95 /scripts/lib/kdoc/kdoc_parser.py | |
parent | iommufd/selftest: Prepare for mock_viommu_alloc_domain_nested() (diff) | |
download | linux-rng-86070569450eec1a3b6a358be90a99cab87aa425.tar.xz linux-rng-86070569450eec1a3b6a358be90a99cab87aa425.zip |
iommufd/selftest: Add refcount to mock_iommu_device
For an iommu_dev that can unplug (so far only this selftest does so), the
viommu->iommu_dev pointer has no guarantee of its life cycle after it is
copied from the idev->dev->iommu->iommu_dev.
Track the user count of the iommu_dev. Postpone the exit routine using a
completion, if refcount is unbalanced. The refcount inc/dec will be added
in the following patch.
Link: https://patch.msgid.link/r/33f28d64841b497eebef11b49a571e03103c5d24.1730836219.git.nicolinc@nvidia.com
Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_parser.py')
0 files changed, 0 insertions, 0 deletions