diff options
author | Nicolin Chen <[email protected]> | 2024-11-05 12:04:26 -0800 |
---|---|---|
committer | Jason Gunthorpe <[email protected]> | 2024-11-12 11:46:18 -0400 |
commit | 86070569450eec1a3b6a358be90a99cab87aa425 (patch) | |
tree | 5b56731eae8f3d0cc008b24b7bcf7acdf83c8f95 /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | 18f819901d53b8d1101d3227c87b0d623e9d78f6 (diff) |
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 <[email protected]>
Reviewed-by: Kevin Tian <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]>
Signed-off-by: Nicolin Chen <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions