msm: vidc: Fix race condition with v4l2 event handler
The v4l2 event handler struct should be initialized
before we add inst to the core->instances list.
Consider a case where there are few video sessions playing,
and a new video instance is opened. Before the new instance
is fully initialized, suppose there is a sys error from
firmware. In the response handler thread, driver will try
to send notifications to all the clients. Here it will
access the uninitialzed event handler struct of the recently
opened instance and crash. The fix is to ensure that the
instance is completely initialized before being added to the
core instance list.
Change-Id: Ic94a78b8948d904e357b94861e33a360409b082b
Signed-off-by:
Arun Menon <avmenon@codeaurora.org>
Loading
Please register or sign in to comment