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:Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Vinod Koul <vkoul@kernel.org> Signed-off-by:
Liu Mingrui <liumingrui@huawei.com>
Loading
Please sign in to comment