Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 28b53604 authored by Maheshwar Ajja's avatar Maheshwar Ajja
Browse files

msm: vidc: fix issue when video session opening failed



There is null pointer access occurring when video session
opening failed and power collapse thread sending sys_error
to all opened sessions in parallel. Fix the issue by doing
v4l2_fh_exit() afer removing new session from core->instances
list.

CRs-Fixed: 1088562
Change-Id: I2523a46487a03ade40afeddd394a4572283d91a2
Signed-off-by: default avatarMaheshwar Ajja <majja@codeaurora.org>
parent 368fecd7
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -1239,14 +1239,13 @@ void *msm_vidc_open(int core_id, int session_type)

	return inst;
fail_init:
	v4l2_fh_del(&inst->event_handler);
	v4l2_fh_exit(&inst->event_handler);
	vb2_queue_release(&inst->bufq[OUTPUT_PORT].vb2_bufq);

	mutex_lock(&core->lock);
	list_del(&inst->list);
	mutex_unlock(&core->lock);

	v4l2_fh_del(&inst->event_handler);
	v4l2_fh_exit(&inst->event_handler);
	vb2_queue_release(&inst->bufq[OUTPUT_PORT].vb2_bufq);
fail_bufq_output:
	vb2_queue_release(&inst->bufq[CAPTURE_PORT].vb2_bufq);
fail_bufq_capture: