Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 6266c29d authored by Laura Abbott's avatar Laura Abbott Committed by Stephen Boyd
Browse files

iommu: msm: Use scattergather list as reference for lookup



Previously, all IOMMU mapping was based on the ion buffer. Ion
handles and buffers are treated separately and may be reference
counted separtely. The current iommu abstraction layer uses the
ion handle for tracking instead of the buffer. Unfortunately, there
seems to be a race where the handle may have been freed despite
still being tracked in the IOMMU data structures. To ensure that
there are no issues with buffers going away, switch to use the
sg_table which is tied to the buffer for tracking and take a
reference to the buffer. The sg_table will be present and unique
for the entire lifetime of the buffer so it's safe to use for
metadata tracking.

Change-Id: I2d26a75427bad32b45f4277abecb2772c5283c79
CRs-Fixed: 482382
Signed-off-by: default avatarLaura Abbott <lauraa@codeaurora.org>
parent 8e1a9206
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment