linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "Pavel Machek" <pavel@ucw.cz>, "Lee Jones" <lee@kernel.org>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Heiner Kallweit" <hkallweit1@gmail.com>,
	regressions@lists.linux.dev, linux-leds@vger.kernel.org,
	"Genes Lists" <lists@sapience.com>,
	"Johannes Wüller" <johanneswueller@gmail.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH] leds: class: Revert: "If no default trigger is given, make hw_control trigger the default trigger"
Date: Fri, 7 Jun 2024 17:26:49 +0200	[thread overview]
Message-ID: <7a73693e-87b4-4161-a058-4e36f50e1376@redhat.com> (raw)
In-Reply-To: <6ebdcaca-c95a-48bc-b1ca-51cc1d7a86a5@lunn.ch>

Hi Andrew,

On 6/7/24 2:03 PM, Andrew Lunn wrote:
> On Fri, Jun 07, 2024 at 12:18:47PM +0200, Hans de Goede wrote:
>> Commit 66601a29bb23 ("leds: class: If no default trigger is given, make
>> hw_control trigger the default trigger") causes ledtrig-netdev to get
>> set as default trigger on various network LEDs.
>>
>> This causes users to hit a pre-existing AB-BA deadlock issue in
>> ledtrig-netdev between the LED-trigger locks and the rtnl mutex,
>> resulting in hung tasks in kernels >= 6.9.
>>
>> Solving the deadlock is non trivial, so for now revert the change to
>> set the hw_control trigger as default trigger, so that ledtrig-netdev
>> no longer gets activated automatically for various network LEDs.
>>
>> The netdev trigger is not needed because the network LEDs are usually under
>> hw-control and the netdev trigger tries to leave things that way so setting
>> it as the active trigger for the LED class device is a no-op.
>>
>> Fixes: 66601a29bb23 ("leds: class: If no default trigger is given, make hw_control trigger the default trigger")
>> Reported-by: Genes Lists <lists@sapience.com>
>> Closes: https://lore.kernel.org/all/9d189ec329cfe68ed68699f314e191a10d4b5eda.camel@sapience.com/
>> Reported-by: "Johannes Wüller" <johanneswueller@gmail.com>
>> Closes: https://lore.kernel.org/lkml/e441605c-eaf2-4c2d-872b-d8e541f4cf60@gmail.com/
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> 
> I'm not sure i agree with the Closes: All this does is make it less
> likely to deadlock. The deadlock is still there.

I agree that the deadlock which is the root-cause is still there. But
with this revert ledtrig-netdev will no longer get activated by default.

So now the only way to actually get the code-paths which may deadlock
to run is by the user or some script explicitly activating the netdev
trigger by writing "netdev" to the trigger sysfs file for a LED classdev.
So most users will now no longer hit this, including the reporters of
these bugs.

The auto-activating of the netdev trigger is what is causing these
reports when users are running kernels >= 6.9 .

> But:
> 
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>

Thank you.

Regards,

Hans



  reply	other threads:[~2024-06-07 15:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-07 10:18 [PATCH] leds: class: Revert: "If no default trigger is given, make hw_control trigger the default trigger" Hans de Goede
2024-06-07 12:03 ` Andrew Lunn
2024-06-07 15:26   ` Hans de Goede [this message]
2024-06-12 14:58     ` Linux regression tracking (Thorsten Leemhuis)
2024-06-12 15:06       ` Hans de Goede
2024-06-12 15:26         ` Lee Jones
2024-06-13  6:01           ` Linux regression tracking (Thorsten Leemhuis)
2024-06-16 11:40             ` Thorsten Leemhuis
2024-06-20  9:46 ` Lee Jones
2024-06-20  9:49   ` Lee Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7a73693e-87b4-4161-a058-4e36f50e1376@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=andrew@lunn.ch \
    --cc=hkallweit1@gmail.com \
    --cc=johanneswueller@gmail.com \
    --cc=kuba@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=lists@sapience.com \
    --cc=pavel@ucw.cz \
    --cc=regressions@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).