* [PATCH] ASoC: ti: omap-hdmi: Fix build error from a merge commit
@ 2026-09-03 9:38 Tomi Valkeinen
2026-09-03 9:45 ` sashiko-bot
2026-09-07 21:01 ` Ivaylo Dimitrov
0 siblings, 2 replies; 3+ messages in thread
From: Tomi Valkeinen @ 2026-09-03 9:38 UTC (permalink / raw)
To: Jarkko Nikula, Sen Wang, Liam Girdwood, Mark Brown,
Jaroslav Kysela, Takashi Iwai, Thomas Zimmermann, Ivaylo Dimitrov
Cc: Kuninori Morimoto, linux-sound, linux-omap, linux-kernel,
dri-devel, Tomi Valkeinen
'ad->card' was removed in commit 9af2c1d4f847 ("ASoC: ti: omap-hdmi:
remove unused *card"), but commit 699e5975e2a5 ("drm/omap: Report HDMI
hotplug events to the ASoC HDMI codec") moved that code line. These
commits were applied to different trees, and the merge was not quite
right: assignment to 'ad->card' from the latter commit was left in the
file, causing:
sound/soc/ti/omap-hdmi.c:408:11: error: ‘struct hdmi_audio_data’ has no member named ‘card’
Fix the issue by removing the line.
Reported-by: Mark Brown <broonie@kernel.org>
Closes: https://lore.kernel.org/all/apbbvQSfUbzYRFaw@sirena.org.uk/
Fixes: 1ae7fe832c2d ("Merge drm/drm-next into drm-misc-next")
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
---
sound/soc/ti/omap-hdmi.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sound/soc/ti/omap-hdmi.c b/sound/soc/ti/omap-hdmi.c
index c32ec7c0b0cf..2cabd4cc5b0b 100644
--- a/sound/soc/ti/omap-hdmi.c
+++ b/sound/soc/ti/omap-hdmi.c
@@ -405,7 +405,6 @@ static int omap_hdmi_audio_probe(struct platform_device *pdev)
card->dev = dev;
atomic_set(&ad->jack_state, -1);
- ad->card = card;
snd_soc_card_set_drvdata(card, ad);
ret = devm_snd_soc_register_card(dev, card);
---
base-commit: 97c594f71fa71dc30a0583a76d8b6ef5c5ea10b1
change-id: 20260903-omap-hdmi-fix-7f085e21b708
Best regards,
--
Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] ASoC: ti: omap-hdmi: Fix build error from a merge commit
2026-09-03 9:38 [PATCH] ASoC: ti: omap-hdmi: Fix build error from a merge commit Tomi Valkeinen
@ 2026-09-03 9:45 ` sashiko-bot
2026-09-07 21:01 ` Ivaylo Dimitrov
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-09-03 9:45 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: dri-devel
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Incorrect devres device used for component and PCM registration causing use-after-free on driver unbind.
--
commit d20d30b72e20d6e45546f7cb8a33e56c5ed791b9
Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
ASoC: ti: omap-hdmi: Fix build error from a merge commit
This commit removes an invalid assignment to a deleted member 'card' in the
hdmi_audio_data structure to fix a build error caused by an incorrect merge.
Closes: https://lore.kernel.org/all/apbbvQSfUbzYRFaw@sirena.org.uk/
> diff --git a/sound/soc/ti/omap-hdmi.c b/sound/soc/ti/omap-hdmi.c
> index c32ec7c0b0cf5..2cabd4cc5b0bd 100644
> --- a/sound/soc/ti/omap-hdmi.c
> +++ b/sound/soc/ti/omap-hdmi.c
> @@ -405,7 +405,6 @@ static int omap_hdmi_audio_probe(struct platform_device *pdev)
> card->dev = dev;
>
> atomic_set(&ad->jack_state, -1);
> - ad->card = card;
[Severity: High]
This isn't a bug introduced by this patch, but earlier in this function,
component and PCM devres registration are attached to the parent device
(ad->dssdev) instead of the child platform device (dev):
ret = devm_snd_soc_register_component(ad->dssdev, &omap_hdmi_component,
dai_drv, 1);
...
ret = sdma_pcm_platform_register(ad->dssdev, "audio_tx", NULL);
Could this cause a use-after-free on child driver unbind?
If the omap-hdmi-audio driver is manually unbound via sysfs or its module
is unloaded, the child device's devres hooks execute and memory allocated
for the child (including the hdmi_audio_data struct ad) is freed.
Because devm_snd_soc_register_component() and sdma_pcm_platform_register()
were called using the parent device (ad->dssdev), their devres cleanup
hooks remain attached to the parent and do not execute during child unbind.
Does this leave the ASoC core with dangling pointers to the unloaded module's
static component structures and freed data?
>
> snd_soc_card_set_drvdata(card, ad);
> ret = devm_snd_soc_register_card(dev, card);
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260903-omap-hdmi-fix-v1-1-b0447a1d35d5@ideasonboard.com?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] ASoC: ti: omap-hdmi: Fix build error from a merge commit
2026-09-03 9:38 [PATCH] ASoC: ti: omap-hdmi: Fix build error from a merge commit Tomi Valkeinen
2026-09-03 9:45 ` sashiko-bot
@ 2026-09-07 21:01 ` Ivaylo Dimitrov
1 sibling, 0 replies; 3+ messages in thread
From: Ivaylo Dimitrov @ 2026-09-07 21:01 UTC (permalink / raw)
To: Tomi Valkeinen, Jarkko Nikula, Sen Wang, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, Thomas Zimmermann
Cc: Kuninori Morimoto, linux-sound, linux-omap, linux-kernel,
dri-devel
On 3.09.26 г. 12:38 ч., Tomi Valkeinen wrote:
> 'ad->card' was removed in commit 9af2c1d4f847 ("ASoC: ti: omap-hdmi:
> remove unused *card"), but commit 699e5975e2a5 ("drm/omap: Report HDMI
> hotplug events to the ASoC HDMI codec") moved that code line. These
> commits were applied to different trees, and the merge was not quite
> right: assignment to 'ad->card' from the latter commit was left in the
> file, causing:
>
> sound/soc/ti/omap-hdmi.c:408:11: error: ‘struct hdmi_audio_data’ has no member named ‘card’
>
> Fix the issue by removing the line.
>
> Reported-by: Mark Brown <broonie@kernel.org>
> Closes: https://lore.kernel.org/all/apbbvQSfUbzYRFaw@sirena.org.uk/
> Fixes: 1ae7fe832c2d ("Merge drm/drm-next into drm-misc-next")
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
> ---
> sound/soc/ti/omap-hdmi.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/sound/soc/ti/omap-hdmi.c b/sound/soc/ti/omap-hdmi.c
> index c32ec7c0b0cf..2cabd4cc5b0b 100644
> --- a/sound/soc/ti/omap-hdmi.c
> +++ b/sound/soc/ti/omap-hdmi.c
> @@ -405,7 +405,6 @@ static int omap_hdmi_audio_probe(struct platform_device *pdev)
> card->dev = dev;
>
> atomic_set(&ad->jack_state, -1);
> - ad->card = card;
>
> snd_soc_card_set_drvdata(card, ad);
> ret = devm_snd_soc_register_card(dev, card);
>
> ---
> base-commit: 97c594f71fa71dc30a0583a76d8b6ef5c5ea10b1
> change-id: 20260903-omap-hdmi-fix-7f085e21b708
>
> Best regards,
> --
> Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-07 21:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-03 9:38 [PATCH] ASoC: ti: omap-hdmi: Fix build error from a merge commit Tomi Valkeinen
2026-09-03 9:45 ` sashiko-bot
2026-09-07 21:01 ` Ivaylo Dimitrov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox