msm: qdsp5: Fix kernel panic in voice recording
-Sometimes kernel panic is observed while in voice recording
during release of session, trying to handle page request.
-AudioManager session is disabled during session release after
waiting on stopped flag. As stopped flag is never set, it never
waits for the remaining buffers to be read before disabling the
audiomanager session. The buffer which reaches after sending
disable to the modem sometimes has a wrong packet length and this
might cause memcpy to go beyond the address space of the process
causing kernel panic.
-Set stopped flag when modem acknowledges end of recording. Also
donot copy data from modem if packet length is greater than the
MAX_FRAME_SIZE which is the maximum frame size expected.
CRs-Fixed: 366536
Change-Id: I73dd0e7652389438364f5647620665d130382c91
Signed-off-by:
Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
Loading
Please sign in to comment