msm: vidc: Fix a race condition in error handling
Currently video driver handles session init and clean in one
thread and response handling from HW in another thread. Due to
race conditions response handler thread may access the session
which was already freed by forward thread. Hence synchronize the
forward thread and response handler with session_lock.
Ex : When driver detects SYS_ERROR, it informs client and client
tries to clean the session. In the meantime if HW sends a response,
the response handler thread tries to access the inst struct and this
struct might have freed as part of session close. This causes
use-after-free exception.
CRs-Fixed: 765521
Change-Id: I11519087e9c0dcb95587c6a048853e47032bd1be
Signed-off-by:
Praneeth Paladugu <ppaladug@codeaurora.org>
Loading
Please register or sign in to comment