diff options
author | Jeremy Cline <jcline@redhat.com> | 2020-01-23 04:03:42 -0500 |
---|---|---|
committer | Jeremy Cline <jcline@redhat.com> | 2020-01-23 04:14:32 -0500 |
commit | 13631b2a7e8aa3f6eed809cd5ac8861c04c5d1ba (patch) | |
tree | ab4d471b491b9d3d1bb3aa231ea9123b4632ce1c | |
parent | a91e998e65b63eb0edd1a2a5c666b8ede7b9e3c1 (diff) | |
download | kernel-13631b2a7e8aa3f6eed809cd5ac8861c04c5d1ba.tar.gz kernel-13631b2a7e8aa3f6eed809cd5ac8861c04c5d1ba.tar.xz kernel-13631b2a7e8aa3f6eed809cd5ac8861c04c5d1ba.zip |
Pick up an ALSA bug fix for rhbz 1772498
-rw-r--r-- | ASoC-topology-fix-soc_tplg_fe_link_create-link-dobj-.patch | 60 | ||||
-rw-r--r-- | kernel.spec | 3 |
2 files changed, 63 insertions, 0 deletions
diff --git a/ASoC-topology-fix-soc_tplg_fe_link_create-link-dobj-.patch b/ASoC-topology-fix-soc_tplg_fe_link_create-link-dobj-.patch new file mode 100644 index 000000000..f86069ab9 --- /dev/null +++ b/ASoC-topology-fix-soc_tplg_fe_link_create-link-dobj-.patch @@ -0,0 +1,60 @@ +From 29bc8978342b2d94a65801904c44dc7b0ef88da2 Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela <perex@perex.cz> +Date: Wed, 22 Jan 2020 20:07:52 +0100 +Subject: [PATCH] ASoC: topology: fix soc_tplg_fe_link_create() - link->dobj + initialization order + +The code which checks the return value for snd_soc_add_dai_link() call +in soc_tplg_fe_link_create() moved the snd_soc_add_dai_link() call before +link->dobj members initialization. + +While it does not affect the latest kernels, the old soc-core.c code +in the stable kernels is affected. The snd_soc_add_dai_link() function uses +the link->dobj.type member to check, if the link structure is valid. + +Reorder the link->dobj initialization to make things work again. +It's harmless for the recent code (and the structure should be properly +initialized before other calls anyway). + +The problem is in stable linux-5.4.y since version 5.4.11 when the +upstream commit 76d270364932 was applied. + +Fixes: 76d270364932 ("ASoC: topology: Check return value for snd_soc_add_dai_link()") +Cc: Dragos Tarcatu <dragos_tarcatu@mentor.com> +Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> +Cc: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> +Cc: Mark Brown <broonie@kernel.org> +Cc: <stable@vger.kernel.org> +Signed-off-by: Jaroslav Kysela <perex@perex.cz> +--- + sound/soc/soc-topology.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c +index fd2d22ddc81b..1c143a00633f 100644 +--- a/sound/soc/soc-topology.c ++++ b/sound/soc/soc-topology.c +@@ -1891,6 +1891,10 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg, + link->num_codecs = 1; + link->num_platforms = 1; + ++ link->dobj.index = tplg->index; ++ link->dobj.ops = tplg->ops; ++ link->dobj.type = SND_SOC_DOBJ_DAI_LINK; ++ + if (strlen(pcm->pcm_name)) { + link->name = kstrdup(pcm->pcm_name, GFP_KERNEL); + link->stream_name = kstrdup(pcm->pcm_name, GFP_KERNEL); +@@ -1927,9 +1931,6 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg, + goto err; + } + +- link->dobj.index = tplg->index; +- link->dobj.ops = tplg->ops; +- link->dobj.type = SND_SOC_DOBJ_DAI_LINK; + list_add(&link->dobj.list, &tplg->comp->dobj_list); + + return 0; +-- +2.24.1 + diff --git a/kernel.spec b/kernel.spec index 9cd865a6e..379d56c45 100644 --- a/kernel.spec +++ b/kernel.spec @@ -574,6 +574,9 @@ Patch527: 0001-crypto-ccp-Release-all-allocated-memory-if-sha-type-.patch # https://gitlab.freedesktop.org/drm/intel/issues/673 Patch612: drm-i915-gt-Detect-if-we-miss-WaIdleLiteRestore.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1772498#c101 +Patch602: ASoC-topology-fix-soc_tplg_fe_link_create-link-dobj-.patch + # END OF PATCH DEFINITIONS %endif |