]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
ALSA: hda: ignore invalid NHLT table
authorMark Pearson <markpearson@lenovo.com>
Tue, 2 Mar 2021 14:10:03 +0000 (09:10 -0500)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 23 Apr 2021 09:56:01 +0000 (11:56 +0200)
commit10437e4cc4ee096d18e248e15765359f6451647e
tree8f7006a2a0073f09269e4cc19006f78eacbe330f
parent2093f49322e0787c47c010df86a9c5742ac43039
ALSA: hda: ignore invalid NHLT table

BugLink: https://bugs.launchpad.net/bugs/1923220
[ Upstream commit a14a6219996ee6f6e858d83b11affc7907633687 ]

On some Lenovo systems if the microphone is disabled in the BIOS
only the NHLT table header is created, with no data. This means
the endpoints field is not correctly set to zero - leading to an
unintialised variable and hence invalid descriptors are parsed
leading to page faults.

The Lenovo firmware team is addressing this, but adding a check
preventing invalid tables being parsed is worthwhile.

Tested on a Lenovo T14.

Tested-by: Philipp Leskovitz <philipp.leskovitz@secunet.com>
Reported-by: Philipp Leskovitz <philipp.leskovitz@secunet.com>
Signed-off-by: Mark Pearson <markpearson@lenovo.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210302141003.7342-1-markpearson@lenovo.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
sound/hda/intel-nhlt.c