msm: camera: isp: Check for execution context prior to obtaining lock
Currently, in_interrupt() is used to determine task context. in_interrupt() would return 0 if the execution is in task context; a spin lock is obtained with bh disabled. Since the bh's are disabled, the preempt count/soft_irq disable count would increase. When we attempt to release the lock, the same in_interrupt() API would now return non-zero, failing to release the lock. The change uses appropriate preempt API to determine execution context. CRs-Fixed: 3509317 Change-Id: I43f981bf3a2d4c238cebc4b29fa8a9aa0a8e0df3 Signed-off-by: Soumen Ghosh <quic_soumeng@quicinc.com>
This commit is contained in:

committed by
Camera Software Integration

parent
3a2d1f7f4e
commit
9e69478cf5
@@ -3683,7 +3683,7 @@ 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())
|
||||
if (in_task())
|
||||
spin_lock_bh(&ctx->lock);
|
||||
|
||||
/* Check for req in active/wait lists */
|
||||
@@ -3744,7 +3744,7 @@ static int __cam_isp_ctx_validate_for_req_reapply_util(
|
||||
}
|
||||
|
||||
end:
|
||||
if (!in_interrupt())
|
||||
if (in_task())
|
||||
spin_unlock_bh(&ctx->lock);
|
||||
return rc;
|
||||
}
|
||||
|
Reference in New Issue
Block a user