Commit 96728e18 authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Liu Mingrui
Browse files

soundwire: intel: filter SoundWire controller device search

mainline inclusion
from mainline-v5.3-rc1
commit 6f11586f
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I947TK
CVE: CVE-2021-46926

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6f11586f4896ee448262747788a0a3faf0fe9066



--------------------------------

The convention is that the SoundWire controller device is a child of
the HDAudio controller. However there can be more than one child
exposed in the DSDT table, and the current namespace walk returns the
last (incorrect) device.

Intel documentation states that bits 28..31 of the _ADR field
represent the link type, with SoundWire assigned the value 4.

Add a filter and terminate early when a valid _ADR is provided,
otherwise keep iterating to find the next child.

Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
Signed-off-by: default avatarLiu Mingrui <liumingrui@huawei.com>
parent bf1b7dd5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment