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:
Jordan Crouse <jcrouse@codeaurora.org>
Loading
Please register or sign in to comment