linux/drivers/leds/trigger
Pavel Machek 433068aa88 leds: avoid flush_work in atomic context
It turns out that various triggers use led_blink_setup() from atomic
context, so we can't do a flush_work there. Flush is still needed for
slow LEDs, but we can move it to sysfs code where it is safe.

    WARNING: inconsistent lock state
    5.2.0-rc1 #1 Tainted: G        W
    --------------------------------
    inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
    swapper/1/0 [HC0[0]:SC1[1]:HE1:SE0] takes:
    000000006e30541b
    ((work_completion)(&led_cdev->set_brightness_work)){+.?.}, at:
    +__flush_work+0x3b/0x38a
    {SOFTIRQ-ON-W} state was registered at:
      lock_acquire+0x146/0x1a1
     __flush_work+0x5b/0x38a
     flush_work+0xb/0xd
     led_blink_setup+0x1e/0xd3
     led_blink_set+0x3f/0x44
     tpt_trig_timer+0xdb/0x106
     ieee80211_mod_tpt_led_trig+0xed/0x112

Fixes: 0db37915d9 ("leds: avoid races with workqueue")
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Tested-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2019-05-26 18:39:38 +02:00
..
Kconfig leds: trigger: Introduce audio mute LED trigger 2018-11-28 12:28:30 +01:00
ledtrig-activity.c leds: activity trigger: simplifications from core changes 2018-07-05 23:21:14 +02:00
ledtrig-audio.c leds: trigger: Introduce audio mute LED trigger 2018-11-28 12:28:30 +01:00
ledtrig-backlight.c leds: backlight trigger: simplifications from core changes 2018-07-05 23:21:14 +02:00
ledtrig-camera.c leds: triggers: make the MODULE_LICENSE string match the actual license 2018-07-05 22:59:36 +02:00
ledtrig-cpu.c leds/trigger/cpu: Add LED trigger for all CPUs aggregated 2017-03-06 22:06:47 +01:00
ledtrig-default-on.c leds: default-on trigger: make use of module_led_trigger() 2018-07-05 23:21:14 +02:00
ledtrig-disk.c leds: Extends disk trigger for reads and writes 2018-03-11 20:01:55 +01:00
ledtrig-gpio.c leds: gpio trigger: simplifications from core changes 2018-07-05 23:21:15 +02:00
ledtrig-heartbeat.c leds: heartbeat trigger: simplifications from core changes 2018-07-05 23:21:13 +02:00
ledtrig-mtd.c leds: trigger: Introduce a MTD (NAND/NOR) trigger 2016-04-13 10:23:14 +02:00
ledtrig-netdev.c leds: trigger: netdev: use memcpy in device_name_store 2019-03-30 19:09:32 +01:00
ledtrig-oneshot.c leds: trigger: oneshot: Add initialization from Device Tree 2019-01-16 22:09:18 +01:00
ledtrig-panic.c leds: triggers: Allow to switch the trigger to "panic" on a kernel panic 2016-05-06 10:22:09 +02:00
ledtrig-pattern.c leds: trigger: pattern: Add pattern initialization from Device Tree 2019-01-16 22:08:47 +01:00
ledtrig-timer.c leds: avoid flush_work in atomic context 2019-05-26 18:39:38 +02:00
ledtrig-transient.c leds: transient trigger: simplifications from core changes 2018-07-05 23:21:12 +02:00
Makefile leds: trigger: Introduce audio mute LED trigger 2018-11-28 12:28:30 +01:00