* [alsa-devel] [PATCH] ASoC: soc-core: fix RIP warning on card removal
@ 2019-11-06 14:58 Pierre-Louis Bossart
2019-11-06 16:21 ` [alsa-devel] Applied "ASoC: soc-core: fix RIP warning on card removal" to the asoc tree Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Pierre-Louis Bossart @ 2019-11-06 14:58 UTC (permalink / raw)
To: alsa-devel
Cc: tiwai, broonie, Pierre-Louis Bossart, Kuninori Morimoto,
Ranjani Sridharan
SOF module load/unload tests show nasty recurring warnings:
WARNING: CPU: 5 PID: 1339 at sound/core/control.c:466
snd_ctl_remove+0xf0/0x100 [snd]
RIP: 0010:snd_ctl_remove+0xf0/0x100 [snd]
This regression was introduced by the removal of the call to
soc_remove_link_components() before soc_card_free() is invoked.
Go back to the initial order but only call
soc_remove_link_components() once.
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Fixes: 5a4c9f054ceea ("ASoC: soc-core: snd_soc_unbind_card() cleanup")
GitHub issue: https://github.com/thesofproject/linux/issues/1424
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
sound/soc/soc-core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index b07ecfac39d7..1e08fb5da170 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1951,6 +1951,9 @@ static void soc_cleanup_card_resources(struct snd_soc_card *card)
{
struct snd_soc_dai_link *link, *_link;
+ /* This should be called before snd_card_free() */
+ soc_remove_link_components(card);
+
/* free the ALSA card at first; this syncs with pending operations */
if (card->snd_card) {
snd_card_free(card->snd_card);
@@ -1959,7 +1962,6 @@ static void soc_cleanup_card_resources(struct snd_soc_card *card)
/* remove and free each DAI */
soc_remove_link_dais(card);
- soc_remove_link_components(card);
for_each_card_links_safe(card, link, _link)
snd_soc_remove_dai_link(card, link);
--
2.20.1
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [alsa-devel] Applied "ASoC: soc-core: fix RIP warning on card removal" to the asoc tree
2019-11-06 14:58 [alsa-devel] [PATCH] ASoC: soc-core: fix RIP warning on card removal Pierre-Louis Bossart
@ 2019-11-06 16:21 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2019-11-06 16:21 UTC (permalink / raw)
To: Pierre-Louis Bossart
Cc: tiwai, alsa-devel, Mark Brown, Ranjani Sridharan, Kuninori Morimoto
The patch
ASoC: soc-core: fix RIP warning on card removal
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.5
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
From df95a16d2a9626dcfc3f2b3671c9b91fa076c997 Mon Sep 17 00:00:00 2001
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Date: Wed, 6 Nov 2019 08:58:01 -0600
Subject: [PATCH] ASoC: soc-core: fix RIP warning on card removal
SOF module load/unload tests show nasty recurring warnings:
WARNING: CPU: 5 PID: 1339 at sound/core/control.c:466
snd_ctl_remove+0xf0/0x100 [snd]
RIP: 0010:snd_ctl_remove+0xf0/0x100 [snd]
This regression was introduced by the removal of the call to
soc_remove_link_components() before soc_card_free() is invoked.
Go back to the initial order but only call
soc_remove_link_components() once.
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Fixes: 5a4c9f054ceea ("ASoC: soc-core: snd_soc_unbind_card() cleanup")
GitHub issue: https://github.com/thesofproject/linux/issues/1424
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20191106145801.9316-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/soc-core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index cc596871ba7f..a7ad81ec59db 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1974,6 +1974,9 @@ static void soc_cleanup_card_resources(struct snd_soc_card *card)
{
struct snd_soc_dai_link *link, *_link;
+ /* This should be called before snd_card_free() */
+ soc_remove_link_components(card);
+
/* free the ALSA card at first; this syncs with pending operations */
if (card->snd_card) {
snd_card_free(card->snd_card);
@@ -1982,7 +1985,6 @@ static void soc_cleanup_card_resources(struct snd_soc_card *card)
/* remove and free each DAI */
soc_remove_link_dais(card);
- soc_remove_link_components(card);
for_each_card_links_safe(card, link, _link)
snd_soc_remove_dai_link(card, link);
--
2.20.1
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-06 16:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06 14:58 [alsa-devel] [PATCH] ASoC: soc-core: fix RIP warning on card removal Pierre-Louis Bossart
2019-11-06 16:21 ` [alsa-devel] Applied "ASoC: soc-core: fix RIP warning on card removal" to the asoc tree Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).