Re: [PATCH RESEND 1/5] leds: leds-st1202: fix NULL pointer access on race condition

Manuel Fombuena
2025-02-12T16:28:41Z

On Tue, 11 Feb 2025, Lee Jones wrote:

> On Sat, 01 Feb 2025, Manuel Fombuena wrote:
>
> > st1202_dt_init() calls devm_led_classdev_register_ext() before the
> > internal data structures are properly setup, so the leds become visible
> > to user space while being partially initialized, leading to a window
> > where trying to access them causes a NULL pointer access.
>
> If this is true, you need to provide a Fixes: tag and to Cc: Stable.
>
> Documentation/process/stable-kernel-rules.rst
>

Yes, some circumstances have to confluence but it is reproducible under
normal use. I can send panic logs if you want to see the details.

Since this driver has been added in 6.14-rc1, I thought that, if applied,
this patch would be included in fixes before the final release and there
would be no need to apply it to -stable trees, as it is nowhere else at
the moment. But of course I will review the documentation and make changes as
suggested.

-- Manuel Fombuena