generic: add leds_st1202 patch to fix NULL pointer access
authorManuel Fombuena <fombuena@outlook.com>
Tue, 14 Jan 2025 12:37:20 +0000 (12:37 +0000)
committerRobert Marko <robimarko@gmail.com>
Sun, 19 Jan 2025 10:07:05 +0000 (11:07 +0100)
commitec8a128cbb2106132731fcb3528c9004859b86f2
tree92b58a8353acbebf5625547b43a2d545bb0e1615
parent99431e315039d7f9689b21a8aa220adadf52a886
generic: add leds_st1202 patch to fix NULL pointer access

As per @KanjiMonster comment: 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.

Move devm_led_classdev_register_ext() to the last thing to happen during initialization.

Signed-off-by: Manuel Fombuena <fombuena@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/17543
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/generic/pending-6.6/893-leds_st1202-Fix-NULL-pointer-access-error.patch [new file with mode: 0644]