[PATCH] coresight: ctcu: fix the spin_bug
James Clark
james.clark at linaro.org
Thu Feb 19 08:43:23 PST 2026
On 19/02/2026 2:46 pm, Jie Gan wrote:
> 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,
Reviewed-by: James Clark <james.clark at linaro.org>
I checked the other ones and they're all initialized, this was the only
missing one.
More information about the linux-arm-kernel
mailing list