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

Commit 0f6b8274 authored by Deepak Kumar's avatar Deepak Kumar
Browse files

msm: kgsl: Correctly put process refcount in iommu fault handler



In iommu fault handler, we do early exit without putting process
refcount in case stall-on-fault is enabled and device mutex is
held by someone else. Fix this by putting process refcount in
case of early exit. This is needed to avoid process leak.

Change-Id: I35c7e6b11deda72ae99a52c62985370e8d431f69
Signed-off-by: default avatarDeepak Kumar <dkumar@codeaurora.org>
parent 3d81cc9c
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -864,16 +864,13 @@ static int kgsl_iommu_fault_handler(struct iommu_domain *domain,
				dev_err(ctx->kgsldev->dev, "*EMPTY*\n");
		}
	}
	if (fault_ret_flag)
		return ret;


	/*
	 * We do not want the h/w to resume fetching data from an iommu
	 * that has faulted, this is better for debugging as it will stall
	 * the GPU and trigger a snapshot. Return EBUSY error.
	 */
	if (test_bit(KGSL_FT_PAGEFAULT_GPUHALT_ENABLE,
	if (!fault_ret_flag && test_bit(KGSL_FT_PAGEFAULT_GPUHALT_ENABLE,
		&adreno_dev->ft_pf_policy) &&
		(flags & IOMMU_FAULT_TRANSACTION_STALLED)) {
		uint32_t sctlr_val;