* [PATCH v2] ASoC: SOF: topology: Fix null pointer dereference
@ 2025-04-28 13:32 Julien Massot
2025-04-28 19:14 ` Laurentiu Mihalcea
2025-04-28 20:37 ` Cristian Ciocaltea
0 siblings, 2 replies; 4+ messages in thread
From: Julien Massot @ 2025-04-28 13:32 UTC (permalink / raw)
To: kernel, Liam Girdwood, Peter Ujfalusi, Bard Liao,
Ranjani Sridharan, Daniel Baluta, Kai Vehmanen,
Pierre-Louis Bossart, Mark Brown, Jaroslav Kysela, Takashi Iwai
Cc: Liam Girdwood, sound-open-firmware, linux-sound, linux-kernel,
Julien Massot
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,
--
Julien Massot <julien.massot@collabora.com>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ASoC: SOF: topology: Fix null pointer dereference
2025-04-28 13:32 [PATCH v2] ASoC: SOF: topology: Fix null pointer dereference Julien Massot
@ 2025-04-28 19:14 ` Laurentiu Mihalcea
2025-04-28 20:37 ` Cristian Ciocaltea
1 sibling, 0 replies; 4+ messages in thread
From: Laurentiu Mihalcea @ 2025-04-28 19:14 UTC (permalink / raw)
To: Julien Massot, kernel, Liam Girdwood, Peter Ujfalusi, Bard Liao,
Ranjani Sridharan, Daniel Baluta, Kai Vehmanen,
Pierre-Louis Bossart, Mark Brown, Jaroslav Kysela, Takashi Iwai
Cc: Liam Girdwood, sound-open-firmware, linux-sound, linux-kernel
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>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ASoC: SOF: topology: Fix null pointer dereference
2025-04-28 13:32 [PATCH v2] ASoC: SOF: topology: Fix null pointer dereference Julien Massot
2025-04-28 19:14 ` Laurentiu Mihalcea
@ 2025-04-28 20:37 ` Cristian Ciocaltea
2025-04-29 8:15 ` Julien Massot
1 sibling, 1 reply; 4+ messages in thread
From: Cristian Ciocaltea @ 2025-04-28 20:37 UTC (permalink / raw)
To: Julien Massot, kernel, Liam Girdwood, Peter Ujfalusi, Bard Liao,
Ranjani Sridharan, Daniel Baluta, Kai Vehmanen,
Pierre-Louis Bossart, Mark Brown, Jaroslav Kysela, Takashi Iwai
Cc: Liam Girdwood, sound-open-firmware, linux-sound, linux-kernel
On 4/28/25 4:32 PM, Julien Massot wrote:
> Prevent null pointer dereference in snd_sof_load_topology()
It looks like the commit description is now incomplete.
> 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(-)
[...]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ASoC: SOF: topology: Fix null pointer dereference
2025-04-28 20:37 ` Cristian Ciocaltea
@ 2025-04-29 8:15 ` Julien Massot
0 siblings, 0 replies; 4+ messages in thread
From: Julien Massot @ 2025-04-29 8:15 UTC (permalink / raw)
To: Cristian Ciocaltea, kernel, Liam Girdwood, Peter Ujfalusi,
Bard Liao, Ranjani Sridharan, Daniel Baluta, Kai Vehmanen,
Pierre-Louis Bossart, Mark Brown, Jaroslav Kysela, Takashi Iwai
Cc: Liam Girdwood, sound-open-firmware, linux-sound, linux-kernel
Hi Cristian,
On Mon, 2025-04-28 at 23:37 +0300, Cristian Ciocaltea wrote:
> On 4/28/25 4:32 PM, Julien Massot wrote:
> > Prevent null pointer dereference in snd_sof_load_topology()
>
> It looks like the commit description is now incomplete.
Thanks for noticing, sent a V3.
>
--
Julien
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-04-29 8:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-28 13:32 [PATCH v2] ASoC: SOF: topology: Fix null pointer dereference Julien Massot
2025-04-28 19:14 ` Laurentiu Mihalcea
2025-04-28 20:37 ` Cristian Ciocaltea
2025-04-29 8:15 ` Julien Massot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox