Re: [PATCH] leds: triggers: flush pending brightness before activating trigger

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 03 Jun 2024, Thomas Weißschuh wrote:

> 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: 0db37915d912 ("leds: avoid races with workqueue")
> Fixes: 8c0f693c6eff ("leds: avoid flush_work in atomic context")
> Signed-off-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>
> ---
> Dustin, could you validate that this fixes the issue you encountered in
> the cros_ec led driver?
> ---
>  drivers/leds/led-triggers.c          | 10 ++++++++--
>  drivers/leds/trigger/ledtrig-timer.c |  5 -----
>  2 files changed, 8 insertions(+), 7 deletions(-)

This patch clashes with:

  https://lore.kernel.org/all/20240531120124.75662-1-hdegoede@xxxxxxxxxx/

Please rebase and ensure that your solution doesn't conflict.

-- 
Lee Jones [李琼斯]




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux