Przeglądaj źródła

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: Vikram Sharma <[email protected]>
Vikram Sharma 5 lat temu
rodzic
commit
7d3a0f3abb
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      drivers/cam_req_mgr/cam_req_mgr_core.c

+ 3 - 2
drivers/cam_req_mgr/cam_req_mgr_core.c

@@ -3026,12 +3026,13 @@ static int __cam_req_mgr_unlink(struct cam_req_mgr_core_link *link)
 	}
 	}
 
 
 	mutex_lock(&link->lock);
 	mutex_lock(&link->lock);
-	/* Destroy timer of link */
-	crm_timer_exit(&link->watchdog);
 
 
 	/* Destroy workq of link */
 	/* Destroy workq of link */
 	cam_req_mgr_workq_destroy(&link->workq);
 	cam_req_mgr_workq_destroy(&link->workq);
 
 
+	/* Destroy timer of link */
+	crm_timer_exit(&link->watchdog);
+
 	/* Cleanup request tables and unlink devices */
 	/* Cleanup request tables and unlink devices */
 	__cam_req_mgr_destroy_link_info(link);
 	__cam_req_mgr_destroy_link_info(link);