Re: [PATCH v2 1/1] coresight: syscfg: fix deadlock on device registration failure
From: yingchao deng
Date: Thu Sep 24 2026 - 22:44:05 EST
On 25/09/2026 00:24, Leo Yan wrote:
For this patch:Happy to. I'll send the patch.
Reviewed-by: Leo Yan<leo.yan@xxxxxxx>
Sashiko reported an issue for null pointer dereference if configfs
init fails fails [1]. It is good to fix it using a separate patch:
@@ -1299,8 +1299,10 @@ int __init cscfg_init(void)
/* initialise configfs subsystem */
err = cscfg_configfs_init(cscfg_mgr);
- if (err)
- goto exit_err;
+ if (err) {
+ device_unregister(cscfg_device());
+ return err;
+ }
/* preload built-in configurations */
err = cscfg_preload(THIS_MODULE);
@Yingchao, do you mind to work out a formal patch for this?
Thanks,
Yingchao