diff options
author | Miaoqian Lin <[email protected]> | 2022-12-30 12:31:00 +0400 |
---|---|---|
committer | Joerg Roedel <[email protected]> | 2023-01-13 13:46:22 +0100 |
commit | a6a9a5da68084d5eac6ef85ad09df7fc9c971de4 (patch) | |
tree | ee15967813b0327b16f051bf9f504036a68138e8 /rust/alloc/alloc.rs | |
parent | 32ea2c57dc216b6ad8125fa680d31daa5d421c95 (diff) |
iommu: Fix refcount leak in iommu_device_claim_dma_owner
iommu_group_get() returns the group with the reference incremented.
Move iommu_group_get() after owner check to fix the refcount leak.
Fixes: 89395ccedbc1 ("iommu: Add device-centric DMA ownership interfaces")
Signed-off-by: Miaoqian Lin <[email protected]>
Reviewed-by: Lu Baolu <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[ joro: Remove *group = NULL initialization ]
Signed-off-by: Joerg Roedel <[email protected]>
Diffstat (limited to 'rust/alloc/alloc.rs')
0 files changed, 0 insertions, 0 deletions