diff options
author | Robin Murphy <[email protected]> | 2016-08-09 16:23:17 +0100 |
---|---|---|
committer | Joerg Roedel <[email protected]> | 2016-08-09 17:31:39 +0200 |
commit | 3ec60043f7c02e1f79e4a90045ff2d2e80042941 (patch) | |
tree | b6f7459538e1fcbe356b061ea65c4ec51b78f4c9 /tools/perf/scripts/python/bin/export-to-postgresql-report | |
parent | 9a8a5dcf20eee254ce490f12d579ef80ee776eb6 (diff) |
iommu/dma: Don't put uninitialised IOVA domains
Due to the limitations of having to wait until we see a device's DMA
restrictions before we know how we want an IOVA domain initialised,
there is a window for error if a DMA ops domain is allocated but later
freed without ever being used. In that case, init_iova_domain() was
never called, so calling put_iova_domain() from iommu_put_dma_cookie()
ends up trying to take an uninitialised lock and crashing.
Make things robust by skipping the call unless the IOVA domain actually
has been initialised, as we probably should have done from the start.
Fixes: 0db2e5d18f76 ("iommu: Implement common IOMMU ops for DMA mapping")
Cc: [email protected]
Reported-by: Nate Watterson <[email protected]>
Reviewed-by: Nate Watterson <[email protected]>
Tested-by: Nate Watterson <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Tested-by: Eric Auger <[email protected]>
Signed-off-by: Robin Murphy <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/export-to-postgresql-report')
0 files changed, 0 insertions, 0 deletions