msm: vidc: do not set video state to DEINIT very early
If video state set to DEINIT before processing all frame done packets in the list may create video failures as explained below, the client communication to video hardware will fail because of DEINIT state and client will close the session upon failure which will happen in parallel to response thread processing the response packets in the list. It may happen that client already free'd the buffer references and response thread might access the same buffer reference and results in use-after-free memory fault. So In case of sys error from video hardware, set video state to DEINIT after processing all packets in the list to avoid use-after-free failure. Change-Id: Id44c26b1bbfc49e9725bf70e21a3e861a04d0133 Signed-off-by:Maheshwar Ajja <majja@codeaurora.org> Signed-off-by:
Sanjay Singh <sisanj@codeaurora.org>
Loading
Please register or sign in to comment