ALSA: hda: ignore invalid NHLT table
stable inclusion from stable-5.10.27 commit 4dc123500c3bcdb834a3685bc412bf7e2813ea3f bugzilla: 51493 -------------------------------- [ Upstream commit a14a6219 ] 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:
Chen Jun <chenjun102@huawei.com> Acked-by:
Weilong Chen <chenweilong@huawei.com> Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com>
Loading
Please sign in to comment