]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
coresight: Protect unregistration with mutex
authorLeo Yan <leo.yan@arm.com>
Mon, 9 Feb 2026 12:44:35 +0000 (12:44 +0000)
committerSuzuki K Poulose <suzuki.poulose@arm.com>
Wed, 25 Feb 2026 11:14:44 +0000 (11:14 +0000)
commita6c4da4b95a3cfe4f6031bef2d913331dc186142
tree77d4cf6b3c200b468914ccb0fcb8a857b0c93e14
parent2f322f0392814a1b704e14927d282f4b2edb9e98
coresight: Protect unregistration with mutex

The device registration is protected by CoreSight mutex to ensure the
atomic operations when adding a device onto bus.  One the other hand,
the locking is absent when unregister a device.

Use mutex to ensure atomicity on device unregistration.  During
unregistration, unbinding the associated CTI device is not included in
the locking region, as CTI has its own locking mechanism.

Fixes: 8c1d3f79d9ca ("coresight: core: Fix coresight device probe failure issue")
Reviewed-by: James Clark <james.clark@linaro.org>
Signed-off-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20260209-arm_coresight_refactor_dev_register-v4-3-62d6042f76f7@arm.com
drivers/hwtracing/coresight/coresight-core.c