msm: camera: isp: Avoid race condition to prevent list corruption
in case of back-to-back bubble requests, We do internal recovery. We don't have locks for list protection in the internal recovery flow. From the core dump, we had seen that we were handling bubble in one core but we had done list modification on another core during internal recovery without list protection, which results in list corruption. We are accessing the request queue during internal recovery without any locks which are resulting in list corruption. We need to use locks to prevent list corruption in the internal recovery flow. CRs-Fixed: 3444802 Change-Id: Id72077647795e51e112b030d4fb75d80299c1bed Signed-off-by: Chandan Kumar Jha <quic_cjha@quicinc.com>
This commit is contained in:

committed by
Camera Software Integration

parent
a219b9f118
commit
75a996d9a5
@@ -3680,6 +3680,9 @@ static int __cam_isp_ctx_validate_for_req_reapply_util(
|
||||
struct cam_isp_ctx_req *req_isp = NULL;
|
||||
struct cam_context *ctx = ctx_isp->base;
|
||||
|
||||
if (!in_interrupt())
|
||||
spin_lock_bh(&ctx->lock);
|
||||
|
||||
/* Check for req in active/wait lists */
|
||||
if (list_empty(&ctx->active_req_list)) {
|
||||
CAM_DBG(CAM_ISP,
|
||||
@@ -3738,6 +3741,8 @@ static int __cam_isp_ctx_validate_for_req_reapply_util(
|
||||
}
|
||||
|
||||
end:
|
||||
if (!in_interrupt())
|
||||
spin_unlock_bh(&ctx->lock);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user