]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
intel_th: Fix resource handling for ACPI glue layer
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>
Tue, 18 Sep 2018 13:10:48 +0000 (16:10 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Sep 2018 14:08:38 +0000 (16:08 +0200)
commitebe4582281d6e90972f057318a6edea14810ea48
tree4da6cbfc9082c78cb4df7a6a8dcfa040d9770cbf
parent8801922cd94c918e4dc3a108ecaa500c4d40583f
intel_th: Fix resource handling for ACPI glue layer

The core of the driver expects the resource array from the glue layer
to be indexed by even numbers, as is the case for 64-bit PCI resources.
This doesn't hold true for others, ACPI in this instance, which leads
to an out-of-bounds access and an ioremap() on whatever address that
access fetches.

This patch fixes the problem by reading resource array differently based
on whether the 64-bit flag is set, which would indicate PCI glue layer.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Fixes: ebc57e399b8e ("intel_th: Add ACPI glue layer")
CC: stable@vger.kernel.org # v4.17+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/intel_th/core.c