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

Commit c6173fbb authored by Jordan Crouse's avatar Jordan Crouse
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 3045c54b
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