diff options
author | Alexander Shishkin <alexander.shishkin@linux.intel.com> | 2018-03-01 11:15:32 +0300 |
---|---|---|
committer | Alexander Shishkin <alexander.shishkin@linux.intel.com> | 2018-03-28 18:47:19 +0300 |
commit | 9ad577087165478c9d9be82b15ed9bf2db5835f5 (patch) | |
tree | ee117e97296de7c6faac24002cef3026f52cccaf /drivers/hwtracing/intel_th | |
parent | 50352fa730328b2e946fb912d495653b627c0bf9 (diff) | |
download | linux-9ad577087165478c9d9be82b15ed9bf2db5835f5.tar.xz |
intel_th: Use correct method of finding hub
Since commit 8edc514b01e9 ("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: 8edc514b01e9 ("intel_th: Make SOURCE devices children of the root device")
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Diffstat (limited to 'drivers/hwtracing/intel_th')
-rw-r--r-- | drivers/hwtracing/intel_th/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwtracing/intel_th/core.c b/drivers/hwtracing/intel_th/core.c index bf1e4543c722..8e4f5fd8a43e 100644 --- a/drivers/hwtracing/intel_th/core.c +++ b/drivers/hwtracing/intel_th/core.c @@ -927,7 +927,7 @@ EXPORT_SYMBOL_GPL(intel_th_trace_disable); int intel_th_set_output(struct intel_th_device *thdev, unsigned int master) { - struct intel_th_device *hub = to_intel_th_device(thdev->dev.parent); + struct intel_th_device *hub = to_intel_th_hub(thdev); struct intel_th_driver *hubdrv = to_intel_th_driver(hub->dev.driver); if (!hubdrv->set_output) |