Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Laurentiu Mihalcea <laurentiumihalcea111@gmail.com>
To: Julien Massot <julien.massot@collabora.com>,
	kernel@collabora.com, Liam Girdwood <lgirdwood@gmail.com>,
	Peter Ujfalusi <peter.ujfalusi@linux.intel.com>,
	Bard Liao <yung-chuan.liao@linux.intel.com>,
	Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
	Daniel Baluta <daniel.baluta@nxp.com>,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>
Cc: Liam Girdwood <liam.r.girdwood@intel.com>,
	sound-open-firmware@alsa-project.org,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] ASoC: SOF: topology: Fix null pointer dereference
Date: Mon, 28 Apr 2025 22:14:21 +0300	[thread overview]
Message-ID: <59e93077-9882-42e7-bc13-21d60168963f@gmail.com> (raw)
In-Reply-To: <20250428-fixup-of-sof-topology-v2-1-7966515a81b7@collabora.com>



On 4/28/2025 4:32 PM, Julien Massot wrote:
> Prevent null pointer dereference in snd_sof_load_topology()
>
> Signed-off-by: Julien Massot <julien.massot@collabora.com>
> Fixes: 6d5997c412cc ("ASoC: SOF: topology: load multiple topologies")
> ---
> Changes in v2:
> - Better commit message as suggested
> - Link to v1: https://lore.kernel.org/r/20250428-fixup-of-sof-topology-v1-1-dc14376da258@collabora.com
> ---
>  sound/soc/sof/topology.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c
> index e19ba94f2c80a43731b90351bacfde2720db50ed..5d3ee3a86392c5a3fbfd05f83acc99b102c8cf61 100644
> --- a/sound/soc/sof/topology.c
> +++ b/sound/soc/sof/topology.c
> @@ -2481,7 +2481,7 @@ int snd_sof_load_topology(struct snd_soc_component *scomp, const char *file)
>  	if (!tplg_files)
>  		return -ENOMEM;
>  
> -	if (sof_pdata->machine->get_function_tplg_files) {
> +	if (sof_pdata->machine && sof_pdata->machine->get_function_tplg_files) {
>  		tplg_cnt = sof_pdata->machine->get_function_tplg_files(scomp->card,
>  								       sof_pdata->machine,
>  								       tplg_filename_prefix,
>
> ---
> base-commit: 80626102e730787e2cdcab0e36d267bedcd1a63e
> change-id: 20250428-fixup-of-sof-topology-50886568a785
>
> Best regards,

Reviewed-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>

  reply	other threads:[~2025-04-28 19:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-28 13:32 [PATCH v2] ASoC: SOF: topology: Fix null pointer dereference Julien Massot
2025-04-28 19:14 ` Laurentiu Mihalcea [this message]
2025-04-28 20:37 ` Cristian Ciocaltea
2025-04-29  8:15   ` Julien Massot

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=59e93077-9882-42e7-bc13-21d60168963f@gmail.com \
    --to=laurentiumihalcea111@gmail.com \
    --cc=broonie@kernel.org \
    --cc=daniel.baluta@nxp.com \
    --cc=julien.massot@collabora.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=kernel@collabora.com \
    --cc=lgirdwood@gmail.com \
    --cc=liam.r.girdwood@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=pierre-louis.bossart@linux.dev \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=sound-open-firmware@alsa-project.org \
    --cc=tiwai@suse.com \
    --cc=yung-chuan.liao@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox