[PATCH v2 0/1] coresight: syscfg: fix deadlock on device registration failure

From: Yingchao Deng

Date: Mon Sep 14 2026 - 03:59:57 EST


cscfg_create_device() calls put_device() on the error path while holding
cscfg_mutex. If device_register() fails, put_device() drops the last
reference and invokes cscfg_dev_release(), which takes cscfg_mutex again,
deadlocking. This removes the unnecessary mutex from cscfg_dev_release().

Changes in v2:
- Per Leo Yan's suggestion, instead of unlocking before put_device(),
remove the unnecessary mutex from cscfg_dev_release() and take it
only around cscfg_mgr field initialization.
- Links to v1: https://lore.kernel.org/all/604ED754D4669F40+20260825014717.2346-1-dengyingchao@xxxxxxxxxxxxxxx/

Yingchao Deng (1):
coresight: syscfg: fix deadlock on device registration failure

drivers/hwtracing/coresight/coresight-syscfg.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
--
2.33.0