lkml.org 
[lkml]   [2018]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.14 366/496] intel_th: Use correct method of finding hub
    Date
    4.14-stable review patch.  If anyone has any objections, please let me know.

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

    From: Alexander Shishkin <alexander.shishkin@linux.intel.com>

    [ Upstream commit 9ad577087165478c9d9be82b15ed9bf2db5835f5 ]

    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>
    Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    drivers/hwtracing/intel_th/core.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/drivers/hwtracing/intel_th/core.c
    +++ b/drivers/hwtracing/intel_th/core.c
    @@ -935,7 +935,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)

    \
     
     \ /
      Last update: 2018-05-28 12:58    [W:4.033 / U:0.456 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site