Commit 6aae2412 authored by Preetam Singh Ranawat's avatar Preetam Singh Ranawat
Browse files

msm: audio: qdsp6v2: Fix crash with erroneous aac playback



Impact:
Crash with back to back playback of erroneous aac clips

Problem:
There are two if condition to check whether input buffer is eos or not
while adding input buffer to write
It evaluates the first condition for non eos and if it is true
it calls q6 cmd to write input buffer
In a very rare case before evaluation of second condition driver gets
the WRITE DONE EVENT for same input buffer and it frees the buffer
while acknowledging the WRITE DONE event
As buffer has already been freed second if condition evaluates true
and it tries to free the same buffer that leads to a crash

Change:
As both the if condition can not be true for same input buffer
replace second if condition with else if

Change-Id: I28f2bdae322c1f2044ca1c13c445c38bd4823197
CRs-Fixed: 314588
Signed-off-by: default avatarPreetam Singh Ranawat <apranawat@codeaurora.org>
parent c4658f22
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment