msm: vidc: Fix race condition with v4l2 event handler
The v4l2 event handler struct should be de-initialized
after we remove inst from the core->instances list.
E.g. There are two video instances and client has called
close on the first instance. Driver de-initializes the event
handler struct. At this moment, there is a sys error from
firmware. So the response handler thread gets scheduled
and driver tries to notify each client about the hardware
error. Since the driver has already de-initialized the
event handler struct for the first video inst, there is
a null pointer access in the v4l2 framework and causes
a device crash. This change will fix the issue.
Change-Id: If27064d97848b1afda513e1a06bf8750ad25cf2d
Signed-off-by:
Arun Menon <avmenon@codeaurora.org>
Loading
Please register or sign in to comment