summaryrefslogtreecommitdiff
path: root/include/linux/debugfs.h
diff options
context:
space:
mode:
authorChen-Yu Tsai <wenst@chromium.org>2025-10-23 09:12:24 +0300
committerMark Brown <broonie@kernel.org>2025-10-23 15:42:47 +0300
commitedf5c8920240dcafe830908549a0edee4ba3b4b0 (patch)
treeeab635207ec5a101fd55a1a3b8a13209db142b9e /include/linux/debugfs.h
parent638bae3fb225a708dc67db613af62f6d14c4eff4 (diff)
downloadlinux-edf5c8920240dcafe830908549a0edee4ba3b4b0.tar.xz
ASoC: SOF: Fix function topology name check in profile info output
The function topology feature, and the plat_data->machine field that specifies this feature, is ACPI specific. The check didn't take this into consideration, which causes a NULL pointer dereference splat on OF platforms: BUG: KASAN: null-ptr-deref in sof_create_ipc_file_profile (sound/soc/sof/fw-file-profile.c:291 sound/soc/sof/fw-file-profile.c:340) snd_sof Read of size 8 at addr 00000000000000c8 by task (udev-worker)/247 CPU: 7 UID: 0 PID: 247 Comm: (udev-worker) Not tainted 6.18.0-rc2-next-20251023-03804-g93b191bc0c26-dirty #747 PREEMPT ba3c303a11d89508de4087cb5b4f8985b6d87b6f Hardware name: Google Ciri sku2 board (DT) Call trace: [KASAN stuff] sof_create_ipc_file_profile (sound/soc/sof/fw-file-profile.c:291 sound/soc/sof/fw-file-profile.c:340) snd_sof snd_sof_device_probe (sound/soc/sof/core.c:304 sound/soc/sof/core.c:388 sound/soc/sof/core.c:460 sound/soc/sof/core.c:719) snd_sof sof_of_probe (sound/soc/sof/sof-of-dev.c:84) snd_sof_of platform_probe (drivers/base/platform.c:1405) [...] Check that the ACPI specific field is actually valid before accessing it. This was seen on a MediaTek based Chromebook. Fixes: 2b92b98cc476 ("ASoC: SOF: Don't print the monolithic topology name if function topology may be used") Cc: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://patch.msgid.link/20251023061226.1127345-1-wenst@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/debugfs.h')
0 files changed, 0 insertions, 0 deletions