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

Skip to content
Commit f1ea4fd7 authored by Jordan Crouse's avatar Jordan Crouse Committed by Gerrit - the friendly Code Review server
Browse files

msm: kgsl: Release process memory outside of mutex to avoid a deadlock



When a page fault occurs IOMMU takes a mutex and passes over to KGSL
which tries to lock the process mutex to query the pagetable
information:

   page fault -> IOMMU mutex -> KGSL process mutex

When a process is closed KGSL takes the process mutex and then tries
to release memory which takes the IOMMU mutex if it needs to be
mapped:

  close -> KGSL process mutex -> unmap memory -> IOMMU mutex

When the two things happen at the same time classic deadlocks ensue.
The memory destroy doesn't actually have to be done while holding
the process mutex so unlock the mutex and then release the memory.

Change-Id: Ic0dedbade55bf1f8d5900645918977a5dca3d4cd
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent 588bf4eb
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