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

Commit 1edae0dd authored by Jordan Crouse's avatar Jordan Crouse Committed by Jeremy Gebben
Browse files

msm: kgsl: Properly delete the context list node



Use the standard list APIs to delete the context node from the
master context list.  While the current code probably works, it is
risky to mess around with list internals.

Change-Id: Ic0dedbad00a1aa502a4d10feea77f9497abb473f
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent db1d5bbc
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -495,6 +495,8 @@ static void kgsl_iommu_destroy_pagetable(struct kgsl_pagetable *pt)
	struct kgsl_iommu_pt *iommu_pt = pt->priv;
	struct kgsl_mmu *mmu = pt->mmu;

	BUG_ON(!list_empty(&pt->list));

	if (iommu_pt->domain) {
		phys_addr_t domain_ptbase =
					kgsl_iommu_get_pt_base_addr(mmu, pt);
+4 −4
Original line number Diff line number Diff line
@@ -458,10 +458,10 @@ kgsl_mmu_detach_pagetable(struct kgsl_pagetable *pagetable)
		return;

	spin_lock_irqsave(&kgsl_driver.ptlock, flags);
	if (pagetable->list.next) {
		list_del(&pagetable->list);
		pagetable->list.next = NULL;
	}

	if (!list_empty(&pagetable->list))
		list_del_init(&pagetable->list);

	spin_unlock_irqrestore(&kgsl_driver.ptlock, flags);

	pagetable_remove_sysfs_objects(pagetable);