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

yingchao deng dengyingchao at kylinsec.com.cn
Thu Sep 24 19:40:22 PDT 2026


On 25/09/2026 00:24, Leo Yan wrote:
> For this patch:
>
> Reviewed-by: Leo Yan<leo.yan at arm.com>
>
> 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?
Happy to. I'll send the patch.

Thanks,
Yingchao




More information about the linux-arm-kernel mailing list