FAILED: patch "[PATCH] ALSA: hda: cs35l41: Fix NULL pointer dereference in" failed to apply to 6.1-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x c34b04cc6178f33c08331568c7fd25c5b9a39f66
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025121644-maximize-mortified-2555@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From c34b04cc6178f33c08331568c7fd25c5b9a39f66 Mon Sep 17 00:00:00 2001
From: Denis Arefev <[email protected]>
Date: Tue, 2 Dec 2025 13:13:36 +0300
Subject: [PATCH] ALSA: hda: cs35l41: Fix NULL pointer dereference in
cs35l41_hda_read_acpi()
The acpi_get_first_physical_node() function can return NULL, in which case the get_device() function also returns NULL, but this value is then dereferenced without checking,so add a check to prevent a crash.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
sound/hda/codecs/side-codecs/cs35l41_hda.c +2 -0
@@ -1901,6 +1901,8 @@ static int cs35l41_hda_read_acpi(struct cs35l41_hda *cs35l41, const char *hid, i cs35l41->dacpi = adev; physdev =get_device (acpi_get_first_physical_node (adev)); +if (!physdev) +return -ENODEV ; sub =acpi_get_subsystem_id (ACPI_HANDLE (physdev));if (IS_ERR (sub))
Sasha Levin
maintainerPATCH 1/1 ALSA: hda: cs35l41: Fix NULL pointer dereference in cs35l41_hda_read_acpi()
From: Denis Arefev <[email protected]>
[ Upstream commit c34b04cc6178f33c08331568c7fd25c5b9a39f66 ]
The acpi_get_first_physical_node() function can return NULL, in which case the get_device() function also returns NULL, but this value is then dereferenced without checking,so add a check to prevent a crash.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
--- sound/pci/hda/cs35l41_hda.c | 2 ++ 1 file changed, 2 insertions(+)
sound/pci/hda/cs35l41_hda.c +2 -0
@@ -1278,6 +1278,8 @@ static int cs35l41_hda_read_acpi(struct cs35l41_hda *cs35l41, const char *hid, i physdev =get_device (acpi_get_first_physical_node (adev));acpi_dev_put (adev); +if (!physdev) +return -ENODEV ; sub =acpi_get_subsystem_id (ACPI_HANDLE (physdev));if (IS_ERR (sub))
Signature · 1 line
2.51.0