2023-09-13 23:23:16

by Da Xue

[permalink] [raw]
Subject: linux-stable 6.1.53 kernel crash on COLOR_ID_MULTI handling change

Hi Pavel,

We have running systems that use COLOR_ID_MULTI. The GPIO toggles
between two colors and we have used the identifier. RGB is not a good
fit since it is not a RGB LED. Please provide guidance.

This patch causes the system to not start: f741121a2251 leds: Fix
BUG_ON check for LED_COLOR_ID_MULTI that is always false

It was also backported to stable causing previously booting systems to
no longer boot.

Best,
Da Xue


2023-09-14 10:29:52

by Pavel Machek

[permalink] [raw]
Subject: Re: linux-stable 6.1.53 kernel crash on COLOR_ID_MULTI handling change

Hi!

> We have running systems that use COLOR_ID_MULTI. The GPIO toggles
> between two colors and we have used the identifier. RGB is not a good
> fit since it is not a RGB LED. Please provide guidance.
>
> This patch causes the system to not start: f741121a2251 leds: Fix
> BUG_ON check for LED_COLOR_ID_MULTI that is always false
>
> It was also backported to stable causing previously booting systems to
> no longer boot.

Lets cc patch authors.

And please drop this from stable, it does not belong there.

Best regards,
Pavel
--
People of Russia, stop Putin before his war on Ukraine escalates.


Attachments:
(No filename) (631.00 B)
signature.asc (201.00 B)
Download all attachments

2023-09-18 17:30:06

by Marek Behún

[permalink] [raw]
Subject: Re: linux-stable 6.1.53 kernel crash on COLOR_ID_MULTI handling change

On Thu, 14 Sep 2023 12:21:09 +0200
Pavel Machek <[email protected]> wrote:

> Hi!
>
> > We have running systems that use COLOR_ID_MULTI. The GPIO toggles
> > between two colors and we have used the identifier. RGB is not a good
> > fit since it is not a RGB LED. Please provide guidance.
> >
> > This patch causes the system to not start: f741121a2251 leds: Fix
> > BUG_ON check for LED_COLOR_ID_MULTI that is always false
> >
> > It was also backported to stable causing previously booting systems to
> > no longer boot.
>
> Lets cc patch authors.
>
> And please drop this from stable, it does not belong there.
>
> Best regards,
> Pavel

The BUG_ON was a no-op since it was introduced. It's purpose was to
prevent people from using LED_COLOR_ID_MULTI since it was thought that
non-RGB LEDs are not yet completely agreed on, or something.

But since the BUG_ON was a no-op, someone started using
LED_COLOR_ID_MULTI without noticing that they should not. There are now
even some in-tree device-tree files using LED_COLOR_ID_MULTI.

My patch that fixes the BUG_ON uncovered this and caused a regression
for some people.

I think we have to drop the BUG_ON altoghether now.

I've sent a patch to linux-leds doing just that.

Sorry for the incovenience.

Marek