Patch "coresight: ultrasoc-smb: Fix uninitialized before use buf_hw_base" has been added to the 6.6-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: ultrasoc-smb: Fix uninitialized before use buf_hw_base

to the 6.6-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-ultrasoc-smb-fix-uninitialized-before-use-.patch
and it can be found in the queue-6.6 subdirectory.

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



commit fd0e418758282bfcf58c9fbd29fbeb2c20c86e12
Author: Junhao He <hejunhao3@xxxxxxxxxx>
Date:   Tue Nov 14 21:33:45 2023 +0800

    coresight: ultrasoc-smb: Fix uninitialized before use buf_hw_base
    
    [ Upstream commit 862c135bde8bc185e8aae2110374175e6a1b6ed5 ]
    
    In smb_reset_buffer, the sdb->buf_hw_base variable is uninitialized
    before use, which initializes it in smb_init_data_buffer. And the SMB
    regiester are set in smb_config_inport.
    So move the call after smb_config_inport.
    
    Fixes: 06f5c2926aaa ("drivers/coresight: Add UltraSoc System Memory Buffer driver")
    Signed-off-by: Junhao He <hejunhao3@xxxxxxxxxx>
    Reviewed-by: James Clark <james.clark@xxxxxxx>
    Signed-off-by: Suzuki K Poulose <suzuki.poulose@xxxxxxx>
    Link: https://lore.kernel.org/r/20231114133346.30489-4-hejunhao3@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/hwtracing/coresight/ultrasoc-smb.c b/drivers/hwtracing/coresight/ultrasoc-smb.c
index 2f2aba90a5148..6e32d31a95fe0 100644
--- a/drivers/hwtracing/coresight/ultrasoc-smb.c
+++ b/drivers/hwtracing/coresight/ultrasoc-smb.c
@@ -477,7 +477,6 @@ static int smb_init_data_buffer(struct platform_device *pdev,
 static void smb_init_hw(struct smb_drv_data *drvdata)
 {
 	smb_disable_hw(drvdata);
-	smb_reset_buffer(drvdata);
 
 	writel(SMB_LB_CFG_LO_DEFAULT, drvdata->base + SMB_LB_CFG_LO_REG);
 	writel(SMB_LB_CFG_HI_DEFAULT, drvdata->base + SMB_LB_CFG_HI_REG);
@@ -587,6 +586,7 @@ static int smb_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
+	smb_reset_buffer(drvdata);
 	platform_set_drvdata(pdev, drvdata);
 	spin_lock_init(&drvdata->spinlock);
 	drvdata->pid = -1;




[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