video: driver: fix deadlock issue with response workqueue
Both &inst->stats_work and &inst->response_work both were using &inst->response_workq for scheduling works. From reverse thread handle_session_response_work_handler incremented refcount via get_inst_ref(), at the same time driverfd got closed by HAL. So strongref is held by handle_session_response_work_handler and as part of put_inst(refcount is zero), will attempt to destry &inst->response_workq inside msm_vidc_close_helper. destroy_workqueue() call will wait until all already fired events to complete, which will never happen in this case i.e leading to deadlock situation. It is an attempt to self destruction, which is not allowed. Added changes to avoid above mentioned situation. Change-Id: Ieb26a4b02f87f2bb738027cfd16e4c261b756dc3 Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
This commit is contained in:
@@ -20,6 +20,7 @@ void handle_session_response_work_handler(struct work_struct *work);
|
||||
int handle_session_response_work(struct msm_vidc_inst *inst,
|
||||
struct response_work *work);
|
||||
int cancel_response_work(struct msm_vidc_inst *inst);
|
||||
int cancel_response_work_sync(struct msm_vidc_inst *inst);
|
||||
int handle_system_error(struct msm_vidc_core *core,
|
||||
struct hfi_packet *pkt);
|
||||
void fw_coredump(struct msm_vidc_core *core);
|
||||
|
Reference in New Issue
Block a user