ALSA: pcm: fix blocking while loop in
Get series with b4
b4 am [email protected]Versions newest first
- v0 Latest1 patch 4 repliesIn review
Patches in v0 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | ALSA: pcm: fix blocking while loop in snd_pcm_update_hw_ptr0()sound/ | +2 | 4 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v0 yet.
Cover letter [PATCH V0 0/1] ALSA: pcm: fix blocking while loop in
When period interrupts are disabled, while loop in snd_pcm_update_hw_ptr0() results in the machine locking up if runtime->hw_ptr_buffer_jiffies is 0. Validate runtime->hw_ptr_buffer_jiffies value before while loop to avoid delta check.
when runtime->hw_ptr_buffer_jiffies is 0 then update of while condition hdelta > xrun_threshold will be always true because hdelta will not change. This will lead to infinite loop causing lock-up
This issue found during stability test, below log explains CPU lock-up on CPU1
[ 922.249028] sched: RT throttling activated for rt_rq ffffffc0f9970778 (cpu 1) [ 922.249028] potential CPU hogs: [ 922.249028] **FastCapture (11426) [ 922.249105] ------------[ cut here ]---------
To fix this lock-up issue, added new condition to check if runtime-> hw_ptr_buffer_jiffies is ZERO or negative.
Raghu Bankapur (1):
ALSA: pcm: fix blocking while loop in snd_pcm_update_hw_ptr0()
sound/core/pcm_lib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
2.17.1