]> git.baikalelectronics.ru Git - 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)
committerTakashi Iwai <tiwai@suse.de>
Thu, 4 Mar 2021 08:14:36 +0000 (09:14 +0100)
commita58ff0a5bc2d3ab9ad2d5e65b4ff0adb17d4b00a
treef2be6d7f844f3c2ffe3d97457f8f09da7a98c49c
parentcccf42efcae05368270d2b5853d24e0299049b86
ALSA: hda: ignore invalid NHLT table

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>
sound/hda/intel-nhlt.c