Commit fcf2a997 authored by Hans de Goede's avatar Hans de Goede Committed by Linus Torvalds

leds: class: Revert: "If no default trigger is given, make hw_control trigger the default trigger"

Commit 66601a29 ("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: 66601a29 ("leds: class: If no default trigger is given, make hw_control trigger the default trigger")
Reported-by: default avatarGenes Lists <lists@sapience.com>
Closes: https://lore.kernel.org/all/9d189ec329cfe68ed68699f314e191a10d4b5eda.camel@sapience.com/Reported-by: default avatarJohannes 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: default avatarHans de Goede <hdegoede@redhat.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Acked-by: default avatarLee Jones <lee@kernel.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a3e18a54
...@@ -552,12 +552,6 @@ int led_classdev_register_ext(struct device *parent, ...@@ -552,12 +552,6 @@ int led_classdev_register_ext(struct device *parent,
led_init_core(led_cdev); led_init_core(led_cdev);
#ifdef CONFIG_LEDS_TRIGGERS #ifdef CONFIG_LEDS_TRIGGERS
/*
* If no default trigger was given and hw_control_trigger is set,
* make it the default trigger.
*/
if (!led_cdev->default_trigger && led_cdev->hw_control_trigger)
led_cdev->default_trigger = led_cdev->hw_control_trigger;
led_trigger_set_default(led_cdev); led_trigger_set_default(led_cdev);
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment