mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
msm: kgsl: Return a valid entry in case of secure GPU address
Currently kgsl_sharedmem_find always returns NULL in case of a secure GPU address as the address would not be part of process pagetable. This can lead to not freeing secure memory as part of kgsl_ioctl_sharedmem_free. Fix this by also checking if the address lies in the secure pagetable range before returning NULL. Change-Id: I79b5686a8fcaf580fc79b8f528b91c987f9138a9 Signed-off-by: Puranam V G Tejaswi <pvgtejas@codeaurora.org>
This commit is contained in:
parent
9efe49ec3a
commit
ab30b65f61
1 changed files with 3 additions and 1 deletions
|
|
@ -1200,7 +1200,9 @@ kgsl_sharedmem_find(struct kgsl_process_private *private, uint64_t gpuaddr)
|
|||
if (!private)
|
||||
return NULL;
|
||||
|
||||
if (!kgsl_mmu_gpuaddr_in_range(private->pagetable, gpuaddr))
|
||||
if (!kgsl_mmu_gpuaddr_in_range(private->pagetable, gpuaddr) &&
|
||||
!kgsl_mmu_gpuaddr_in_range(
|
||||
private->pagetable->mmu->securepagetable, gpuaddr))
|
||||
return NULL;
|
||||
|
||||
spin_lock(&private->mem_lock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue