mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/6] Fix soc compress playback deadlock in 5.15
@ 2023-05-11 12:08 yixuanjiang
  2023-05-11 12:08 ` [PATCH 1/6] ASoC: soc-pcm: use GFP_ATOMIC for dpcm structure yixuanjiang
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: yixuanjiang @ 2023-05-11 12:08 UTC (permalink / raw)
  To: tiwai, lgirdwood, broonie; +Cc: linux-kernel, alsa-devel, yixuanjiang

The patch in 5.15
 aa9ff6a4955f ("ASoC: soc-compress: Reposition and add pcm_mutex")
will cause the deadlock when close compress playback.

It needs backport patch
 b7898396f4 ("ASoC: soc-pcm: Fix and cleanup DPCM locking commit")
to prevent the deadlock issue.

Rootcause is patch b7898396f4 will remove pcm_mutex in soc_pcm_hw_clean
 then patch aa9ff6a4955f add pcm_mutex acqurie back in snd_compr_free
 to fix regression cause from b7898396f4.
If only apply aa9ff6a4955f, it will acqurie pcm_mutex twice cause the deadlock.

There are total 6 patches on these related backport

[  212.063445] sysrq: Show Blocked State
[  212.064964] Call trace:
[  212.064974] __switch_to+0x244/0x454
[  212.065075] __schedule+0x5fc/0xbdc
[  212.065092] schedule+0x154/0x258
[  212.065103] schedule_preempt_disabled+0x30/0x50
[  212.065115] __mutex_lock+0x36c/0x794
[  212.065135] __mutex_lock_slowpath+0x1c/0x2c
[  212.065145] soc_pcm_hw_clean+0x6c/0x364
[  212.065177] dpcm_be_dai_hw_free+0x20c/0x304
[  212.065188] soc_compr_free_fe+0x130/0x448
[  212.065230] snd_compr_free+0xac/0x148
[  212.065316] __fput+0x104/0x438
[  212.065347] ____fput+0x18/0x28
[  212.065409] task_work_run+0x144/0x1f8
[  212.065474] do_notify_resume+0x1d24/0x27b0
[  212.065518] el0_svc+0x68/0xc4
[  212.065601] el0t_64_sync_handler+0x8c/0xfc
[  212.065610] el0t_64_sync+0x1b0/0x1b4

*** BLURB HERE ***

Pierre-Louis Bossart (4):
  ASoC: soc-pcm: use GFP_ATOMIC for dpcm structure
  ASoC: soc-pcm: align BE 'atomicity' with that of the FE
  ASoC: soc-pcm: test refcount before triggering
  ASoC: soc-pcm: fix BE handling of PAUSE_RELEASE

Takashi Iwai (2):
  ASoC: soc-pcm: Fix and cleanup DPCM locking
  ASoC: soc-pcm: serialize BE triggers

 include/sound/soc-dpcm.h |   2 +
 include/sound/soc.h      |   2 -
 sound/soc/soc-core.c     |   1 -
 sound/soc/soc-pcm.c      | 351 +++++++++++++++++++++++++++------------
 4 files changed, 246 insertions(+), 110 deletions(-)

-- 
2.40.1.521.gf1e218fcd8-goog


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-05-11 23:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-11 12:08 [PATCH 0/6] Fix soc compress playback deadlock in 5.15 yixuanjiang
2023-05-11 12:08 ` [PATCH 1/6] ASoC: soc-pcm: use GFP_ATOMIC for dpcm structure yixuanjiang
2023-05-11 23:29   ` Sasha Levin
2023-05-11 12:08 ` [PATCH 2/6] ASoC: soc-pcm: align BE 'atomicity' with that of the FE yixuanjiang
2023-05-11 12:08 ` [PATCH 3/6] ASoC: soc-pcm: Fix and cleanup DPCM locking yixuanjiang
2023-05-11 12:08 ` [PATCH 4/6] ASoC: soc-pcm: serialize BE triggers yixuanjiang
2023-05-11 12:08 ` [PATCH 5/6] ASoC: soc-pcm: test refcount before triggering yixuanjiang
2023-05-11 12:08 ` [PATCH 6/6] ASoC: soc-pcm: fix BE handling of PAUSE_RELEASE yixuanjiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®