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

Commit 612b69ba authored by Deepak Kumar's avatar Deepak Kumar
Browse files

msm; kgsl: Correct secure pagetable pointer check



Secure pagetable pointer in case of secure pagetable creation
failure is set to ERR_PTR. Correct the secure pagetable pointer
check in kgsl_iommu_map_secure_global to avoid invalid pointer
access when someone tries to map a secure global buffer.

Change-Id: Ic938072e38c410a31158b8ab83f2678b2a64f276
Signed-off-by: default avatarDeepak Kumar <dkumar@codeaurora.org>
parent 38b1718d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -182,7 +182,7 @@ static int kgsl_iommu_get_gpuaddr(struct kgsl_pagetable *pagetable,
static void kgsl_iommu_map_secure_global(struct kgsl_mmu *mmu,
		struct kgsl_memdesc *memdesc)
{
	if (!mmu->securepagetable)
	if (IS_ERR_OR_NULL(mmu->securepagetable))
		return;

	if (!memdesc->gpuaddr) {