mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: yixuanjiang <yixuanjiang@google.com>
To: tiwai@suse.com, lgirdwood@gmail.com, broonie@kernel.org
Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org,
	yixuanjiang <yixuanjiang@google.com>
Subject: [PATCH 0/6] Fix soc compress playback deadlock in 5.15
Date: Thu, 11 May 2023 20:08:35 +0800	[thread overview]
Message-ID: <20230511120841.2096524-1-yixuanjiang@google.com> (raw)

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


             reply	other threads:[~2023-05-11 12:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-11 12:08 yixuanjiang [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230511120841.2096524-1-yixuanjiang@google.com \
    --to=yixuanjiang@google.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®