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

Commit 5ef07030 authored by Vikram Sharma's avatar Vikram Sharma Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: isp: Update unlink handling to avoid race



Expire timer after destroying workqueues so that we
do not refer to watchdog timer while the link is
getting unlinked from session handle.

CRs-Fixed: 2585098
Change-Id: Ife2450ae66bd52ec704ac7d593b2daaeb20ba54d
Signed-off-by: default avatarVikram Sharma <vikramsa@codeaurora.org>
parent ee22a156
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -3149,12 +3149,13 @@ static int __cam_req_mgr_unlink(struct cam_req_mgr_core_link *link)
	}

	mutex_lock(&link->lock);
	/* Destroy timer of link */
	crm_timer_exit(&link->watchdog);

	/* Destroy workq of link */
	cam_req_mgr_workq_destroy(&link->workq);

	/* Destroy timer of link */
	crm_timer_exit(&link->watchdog);

	/* Cleanup request tables and unlink devices */
	__cam_req_mgr_destroy_link_info(link);