Re: [PATCH 6.6.y] ASoC: SOF: Intel: hda: Fix NULL pointer dereference
From: Sasha Levin
Date: Tue May 19 2026 - 21:16:10 EST
On Tue, May 19, 2026 at 08:54:19PM -0400, Sasha Levin wrote:
On Tue, May 19, 2026 at 06:44:10PM +0800, Alva Lan wrote:
From: Ranjani Sridharan <ranjani.sridharan@xxxxxxxxxxxxxxx>[...]
[ Upstream commit 16c589567a956d46a7c1363af3f64de3d420af20 ]
If there's a mismatch between the DAI links in the machine driver and
the topology, it is possible that the playback/capture widget is not
set, especially in the case of loopback capture for echo reference
where we use the dummy DAI link. Return the error when the widget is not
set to avoid a null pointer dereference like below when the topology is
broken.
[ Minor context conflict resolved. ]
Signed-off-by: Alva Lan <alvalan9@xxxxxxxxxxx>
Queued for 6.6, thanks.
Ugh...
This backport is missing the !swidget NULL check that the upstream commit also
adds. Upstream 16c589567a95 adds two checks in hda_dai_get_ops(): one for !w
and one for !swidget. Your patch only adds the !w check, so the later "sdai =
swidget->private" still crashes when w is non-NULL but w->dobj.private is NULL.
I'm going to drop it for now.
--
Thanks,
Sasha