[PATCH] coresight: ctcu: fix the spin_bug

Jie Gan jie.gan at oss.qualcomm.com
Thu Feb 19 06:46:57 PST 2026


Acquiring an uninitialized raw_spin_lock is invalid and may trigger
unexpected behavior or spin_bug.

Fixes: f78d206f3d73 ("Coresight: Add Coresight TMC Control Unit driver")
Signed-off-by: Jie Gan <jie.gan at oss.qualcomm.com>
---
 drivers/hwtracing/coresight/coresight-ctcu-core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/hwtracing/coresight/coresight-ctcu-core.c b/drivers/hwtracing/coresight/coresight-ctcu-core.c
index abed15eb72b4..a505b90c09e3 100644
--- a/drivers/hwtracing/coresight/coresight-ctcu-core.c
+++ b/drivers/hwtracing/coresight/coresight-ctcu-core.c
@@ -228,6 +228,7 @@ static int ctcu_probe(struct platform_device *pdev)
 	desc.dev = dev;
 	desc.ops = &ctcu_ops;
 	desc.access = CSDEV_ACCESS_IOMEM(base);
+	raw_spin_lock_init(&drvdata->spin_lock);
 
 	drvdata->csdev = coresight_register(&desc);
 	if (IS_ERR(drvdata->csdev))

---
base-commit: 44982d352c33767cd8d19f8044e7e1161a587ff7
change-id: 20260219-fix-spin-lock-issue-c563c32c5441

Best regards,
-- 
Jie Gan <jie.gan at oss.qualcomm.com>




More information about the linux-arm-kernel mailing list