All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Cc: alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>
Subject: Applied "ASoC: topology: Check widget kcontrols before deref" to the asoc tree
Date: Tue, 17 Apr 2018 18:09:25 +0100	[thread overview]
Message-ID: <E1f8U6f-0001eL-FW@debutante> (raw)
In-Reply-To: <20180327133045.29351-6-liam.r.girdwood@linux.intel.com>

The patch

   ASoC: topology: Check widget kcontrols before deref

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

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 f53c4c20d6d38bcefd89bfcab135486cbb797884 Mon Sep 17 00:00:00 2001
From: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Date: Tue, 27 Mar 2018 14:30:44 +0100
Subject: [PATCH] ASoC: topology: Check widget kcontrols before deref

Validate the topology input before we dereference the pointer.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/soc-topology.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index 5598e891b2b3..986b8b2f90fb 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -513,7 +513,7 @@ static void remove_widget(struct snd_soc_component *comp,
 	 */
 	if (dobj->widget.kcontrol_type == SND_SOC_TPLG_TYPE_ENUM) {
 		/* enumerated widget mixer */
-		for (i = 0; i < w->num_kcontrols; i++) {
+		for (i = 0; w->kcontrols != NULL && i < w->num_kcontrols; i++) {
 			struct snd_kcontrol *kcontrol = w->kcontrols[i];
 			struct soc_enum *se =
 				(struct soc_enum *)kcontrol->private_value;
@@ -530,7 +530,7 @@ static void remove_widget(struct snd_soc_component *comp,
 		}
 	} else {
 		/* volume mixer or bytes controls */
-		for (i = 0; i < w->num_kcontrols; i++) {
+		for (i = 0; w->kcontrols != NULL && i < w->num_kcontrols; i++) {
 			struct snd_kcontrol *kcontrol = w->kcontrols[i];
 
 			if (dobj->widget.kcontrol_type
-- 
2.17.0

  reply	other threads:[~2018-04-17 17:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-27 13:30 [PATCH v2 0/6] ASoC: SOF driver dependencies Liam Girdwood
2018-03-27 13:30 ` [PATCH v2 1/6] ASoC: core: Allow topology to override machine driver FE DAI link config Liam Girdwood
2018-04-17 17:09   ` Applied "ASoC: core: Allow topology to override machine driver FE DAI link config." to the asoc tree Mark Brown
2018-04-17 17:11   ` Mark Brown
2018-03-27 13:30 ` [PATCH v2 2/6] ASoC: core: Add name prefix for machines with topology rewrites Liam Girdwood
2018-03-27 13:30 ` [PATCH v2 3/6] ASoC: topology: Give more data to clients via callbacks Liam Girdwood
2018-04-17 17:09   ` Applied "ASoC: topology: Give more data to clients via callbacks" to the asoc tree Mark Brown
2018-04-17 17:11   ` Mark Brown
2018-03-27 13:30 ` [PATCH v2 4/6] ASoC: topology: Add callback for DAPM route load/unload Liam Girdwood
2018-04-17 17:09   ` Applied "ASoC: topology: Add callback for DAPM route load/unload" to the asoc tree Mark Brown
2018-04-17 17:11   ` Mark Brown
2018-06-18 12:00   ` Mark Brown
2018-03-27 13:30 ` [PATCH v2 5/6] ASoC: topology: Check widget kcontrols before deref Liam Girdwood
2018-04-17 17:09   ` Mark Brown [this message]
2018-04-17 17:11   ` Applied "ASoC: topology: Check widget kcontrols before deref" to the asoc tree Mark Brown
2018-04-26 11:50   ` Mark Brown
2018-03-27 13:30 ` [PATCH v2 6/6] ASoC: topology: Add support for compressed PCMs Liam Girdwood

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=E1f8U6f-0001eL-FW@debutante \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=liam.r.girdwood@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.