Patch "coresight: cti: disclaim device only when it's claimed" has been added to the 5.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    coresight: cti: disclaim device only when it's claimed

to the 5.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     coresight-cti-disclaim-device-only-when-it-s-claimed.patch
and it can be found in the queue-5.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 23f860a6fc6ef8490ce1354d562e4d22d7568011
Author: Tingwei Zhang <tingwei@xxxxxxxxxxxxxx>
Date:   Wed Sep 16 13:17:26 2020 -0600

    coresight: cti: disclaim device only when it's claimed
    
    [ Upstream commit 0dee28268ddbe53a981d4d87faf5dc0f1700e698 ]
    
    Coresight_claim_device() is called in cti_starting_cpu() only
    when CTI is enabled while coresight_disclaim_device() is called
    uncontionally in cti_dying_cpu(). This triggered below WARNING.
    Only call disclaim device when CTI device is enabled to fix it.
    
    [   75.989643] WARNING: CPU: 1 PID: 14 at
    kernel/drivers/hwtracing/coresight/coresight.c:209
    coresight_disclaim_device_unlocked+0x10/0x24
    [   75.989697] CPU: 1 PID: 14 Comm: migration/1 Not tainted
    5.9.0-rc1-gff1304be0a05-dirty #21
    [   75.989709] Hardware name: Thundercomm Dragonboard 845c (DT)
    [   75.989737] pstate: 80c00085 (Nzcv daIf +PAN +UAO BTYPE=--)
    [   75.989758] pc : coresight_disclaim_device_unlocked+0x10/0x24
    [   75.989775] lr : coresight_disclaim_device+0x24/0x38
    [   75.989783] sp : ffff800011cd3c90
    .
    [   75.990018] Call trace:
    [   75.990041]  coresight_disclaim_device_unlocked+0x10/0x24
    [   75.990066]  cti_dying_cpu+0x34/0x4c
    [   75.990101]  cpuhp_invoke_callback+0x84/0x1e0
    [   75.990121]  take_cpu_down+0x90/0xe0
    [   75.990154]  multi_cpu_stop+0x134/0x160
    [   75.990171]  cpu_stopper_thread+0xb0/0x13c
    [   75.990196]  smpboot_thread_fn+0x1c4/0x270
    [   75.990222]  kthread+0x128/0x154
    [   75.990251]  ret_from_fork+0x10/0x18
    
    Fixes: e9b880581d55 ("coresight: cti: Add CPU Hotplug handling to CTI driver")
    Reviewed-by: Mike Leach <mike.leach@xxxxxxxxxx>
    Signed-off-by: Tingwei Zhang <tingwei@xxxxxxxxxxxxxx>
    Signed-off-by: Mathieu Poirier <mathieu.poirier@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20200916191737.4001561-6-mathieu.poirier@xxxxxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/hwtracing/coresight/coresight-cti.c b/drivers/hwtracing/coresight/coresight-cti.c
index 3ccc703dc9409..d6fea6efec71f 100644
--- a/drivers/hwtracing/coresight/coresight-cti.c
+++ b/drivers/hwtracing/coresight/coresight-cti.c
@@ -742,7 +742,8 @@ static int cti_dying_cpu(unsigned int cpu)
 
 	spin_lock(&drvdata->spinlock);
 	drvdata->config.hw_powered = false;
-	coresight_disclaim_device(drvdata->base);
+	if (drvdata->config.hw_enabled)
+		coresight_disclaim_device(drvdata->base);
 	spin_unlock(&drvdata->spinlock);
 	return 0;
 }



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux