linux/drivers/leds/trigger
Thomas Weißschuh 780785c77e leds: triggers: Flush pending brightness before activating trigger
[ Upstream commit ab477b766e ]

The race fixed in timer_trig_activate() between a blocking
set_brightness() call and trigger->activate() can affect any trigger.
So move the call to flush_work() into led_trigger_set() where it can
avoid the race for all triggers.

Fixes: 0db37915d9 ("leds: avoid races with workqueue")
Fixes: 8c0f693c6e ("leds: avoid flush_work in atomic context")
Cc: stable@vger.kernel.org
Tested-by: Dustin L. Howett <dustin@howett.net>
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20240613-led-trigger-flush-v2-1-f4f970799d77@weissschuh.net
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-19 05:45:29 +02:00
..
Kconfig
ledtrig-activity.c
ledtrig-audio.c
ledtrig-backlight.c
ledtrig-camera.c
ledtrig-cpu.c leds: trigger: ledtrig-cpu:: Fix 'output may be truncated' issue for 'cpu' 2023-11-20 11:08:25 +01:00
ledtrig-default-on.c
ledtrig-disk.c
ledtrig-gpio.c
ledtrig-heartbeat.c
ledtrig-mtd.c
ledtrig-netdev.c
ledtrig-oneshot.c
ledtrig-panic.c leds: trigger: panic: Don't register panic notifier if creating the trigger failed 2024-02-23 08:54:49 +01:00
ledtrig-pattern.c
ledtrig-timer.c leds: triggers: Flush pending brightness before activating trigger 2024-08-19 05:45:29 +02:00
ledtrig-transient.c
ledtrig-tty.c leds: ledtrig-tty: Free allocated ttyname buffer on deactivate 2024-01-25 14:52:32 -08:00
Makefile