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

Skip to content
Commit e01afb23 authored by Tarun Karra's avatar Tarun Karra
Browse files

msm: kgsl: Fix race condition in iommu secure context attach check



IOMMU secure context attach check should be guarded by device mutex.
In iommu map and unmap functions we are doing the attach check without
taking device mutex. This can lead to race condition where attach
check in iommu map/unmap succeeds and just after it iommu is detached
before iommu map/unmap is called leading to a case where we could be
mapping/unmapping to a secure pagetable with no iommu context attached.
Fix this by unconditionally taking an active count while mapping
and unmapping from secure context bank.

CRs-fixed: 719744
Change-Id: I372a70e7aa935676cf9adc01b0464d39b52262b6
Signed-off-by: default avatarTarun Karra <tkarra@codeaurora.org>
parent 169417fe
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