mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
msm: camera: jpeg: Add mutex lock to protect jpeg list corruption
Due to race conditions, situation can arise where the process_irq and flush for jpeg are being handled in parallel. This will cause the jpeg list corruption. This commit protects the code of adding back to free list in process_irq with the mutex. CRs-Fixed: 2578247 Change-Id: I28ee48bc0d5cfcf3ae4a936b2eb2976226ad88d5 Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
This commit is contained in:
parent
b08e2b4099
commit
a29622aedc
1 changed files with 2 additions and 0 deletions
|
|
@ -177,7 +177,9 @@ static int cam_jpeg_mgr_process_irq(void *priv, void *data)
|
|||
PTR_TO_U64(p_cfg_req->hw_cfg_args.priv);
|
||||
ctx_data->ctxt_event_cb(ctx_data->context_priv, 0, &buf_data);
|
||||
|
||||
mutex_lock(&g_jpeg_hw_mgr.hw_mgr_mutex);
|
||||
list_add_tail(&p_cfg_req->list, &hw_mgr->free_req_list);
|
||||
mutex_unlock(&g_jpeg_hw_mgr.hw_mgr_mutex);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue