[PATCH] coresight: tpdm: initialize spinlock before exposing sysfs
Leo Yan
leo.yan at arm.com
Tue Sep 8 09:18:17 PDT 2026
On Tue, Aug 25, 2026 at 10:06:47AM +0800, yingchao wrote:
> From: Yingchao Deng <dengyingchao at kylinsec.com.cn>
>
> tpdm_probe() initializes drvdata->spinlock after coresight_register(), but
> the sysfs attributes registered by coresight_register() use the spinlock.
> This exposes a window where a concurrent sysfs write can lock an
> uninitialized spinlock.
>
> Initialize the spinlock before coresight_register().
>
> Fixes: b3c71626a933 ("Coresight: Add coresight TPDM source driver")
> Signed-off-by: Yingchao Deng <dengyingchao at kylinsec.com.cn>
Reviewed-by: Leo Yan <leo.yan at arm.com>
More information about the linux-arm-kernel
mailing list