]> git.baikalelectronics.ru Git - kernel.git/commit
intel_th: Use correct method of finding hub
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>
Thu, 1 Mar 2018 08:15:32 +0000 (10:15 +0200)
committerAlexander Shishkin <alexander.shishkin@linux.intel.com>
Wed, 28 Mar 2018 15:47:19 +0000 (18:47 +0300)
commit02dba18eb23f729a8b04cceb3ad145b42e26381b
treeee117e97296de7c6faac24002cef3026f52cccaf
parent5e77567a6c6ed8acc9de721c3078f67f4adfc14f
intel_th: Use correct method of finding hub

Since commit 3ca0de2ecdaa ("intel_th: Make SOURCE devices children of the
root device") the hub is not the parent of SOURCE devices any more, so the
new helper function should be used for that instead of always using the
parent. The intel_th_set_output() path, however, still uses the old
logic, leading to the hub driver structure being aliased with something
else, like struct pci_driver or struct acpi_driver, and an incorrect call
to an address inferred from that, potentially resulting in a crash.

Fixes: 3ca0de2ecdaa ("intel_th: Make SOURCE devices children of the root device")
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
drivers/hwtracing/intel_th/core.c