mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/1] coresight: syscfg: fix deadlock on device registration failure
@ 2026-09-14  7:45 Yingchao Deng
  2026-09-14  7:49 ` [PATCH v2 1/1] " Yingchao Deng
  0 siblings, 1 reply; 5+ messages in thread
From: Yingchao Deng @ 2026-09-14  7:45 UTC (permalink / raw)
  To: Suzuki K Poulose, Alexander Shishkin, Mike Leach, James Clark, Leo Yan
  Cc: coresight, linux-arm-kernel, linux-kernel, dengyingchao, qinyungao

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@kylinsec.com.cn/

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-09-25  2:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-14  7:45 [PATCH v2 0/1] coresight: syscfg: fix deadlock on device registration failure Yingchao Deng
2026-09-14  7:49 ` [PATCH v2 1/1] " Yingchao Deng
2026-09-23 10:04   ` Mike Leach
2026-09-24 16:24   ` Leo Yan
2026-09-25  2:40     ` yingchao deng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®