WSL2-Linux-Kernel/drivers/input/keyboard
Steven Rostedt (Google) 292a089d78 treewide: Convert del_timer*() to timer_shutdown*()
Due to several bugs caused by timers being re-armed after they are
shutdown and just before they are freed, a new state of timers was added
called "shutdown".  After a timer is set to this state, then it can no
longer be re-armed.

The following script was run to find all the trivial locations where
del_timer() or del_timer_sync() is called in the same function that the
object holding the timer is freed.  It also ignores any locations where
the timer->function is modified between the del_timer*() and the free(),
as that is not considered a "trivial" case.

This was created by using a coccinelle script and the following
commands:

    $ cat timer.cocci
    @@
    expression ptr, slab;
    identifier timer, rfield;
    @@
    (
    -       del_timer(&ptr->timer);
    +       timer_shutdown(&ptr->timer);
    |
    -       del_timer_sync(&ptr->timer);
    +       timer_shutdown_sync(&ptr->timer);
    )
      ... when strict
          when != ptr->timer
    (
            kfree_rcu(ptr, rfield);
    |
            kmem_cache_free(slab, ptr);
    |
            kfree(ptr);
    )

    $ spatch timer.cocci . > /tmp/t.patch
    $ patch -p1 < /tmp/t.patch

Link: https://lore.kernel.org/lkml/20221123201306.823305113@linutronix.de/
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Acked-by: Pavel Machek <pavel@ucw.cz> [ LED ]
Acked-by: Kalle Valo <kvalo@kernel.org> [ wireless ]
Acked-by: Paolo Abeni <pabeni@redhat.com> [ networking ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-12-25 13:38:09 -08:00
..
Kconfig Input: lpc32xx - allow building with COMPILE_TEST 2022-12-07 13:28:36 -08:00
Makefile Input: pinephone-keyboard - add PinePhone keyboard driver 2022-10-09 22:26:52 -07:00
adc-keys.c
adp5520-keys.c
adp5588-keys.c Input: adp5588-keys - Convert to i2c's .probe_new() 2022-12-02 14:53:41 -08:00
adp5589-keys.c Input: adp5589-keys - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-12-07 13:26:27 -08:00
amikbd.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
applespi.c Input: applespi - replace zero-length array with DECLARE_FLEX_ARRAY() helper 2022-09-26 22:02:32 -07:00
applespi.h
applespi_trace.h
atakbd.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
atkbd.c Input: atkbd - switch to using dev_groups for driver-specific attributes 2022-09-03 12:31:18 -07:00
bcm-keypad.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 2) 2022-06-10 14:51:35 +02:00
cap11xx.c Input: cap11xx - Convert to i2c's .probe_new() 2022-12-02 14:53:41 -08:00
clps711x-keypad.c Input: clps711x-keypad - get rid of OF_GPIO dependency 2022-08-30 14:20:00 -07:00
cros_ec_keyb.c Input: cros-ec-keyb - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-12-07 13:26:37 -08:00
cypress-sf.c Input: cypress-sf - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-12-07 13:26:46 -08:00
davinci_keyscan.c
dlink-dir685-touchkeys.c Input: dlink-dir685-touchkeys - Convert to i2c's .probe_new() 2022-12-02 14:53:41 -08:00
ep93xx_keypad.c Input: ep39xx-keypad - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-12-07 13:26:52 -08:00
goldfish_events.c
gpio_keys.c Input: gpio-keys - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-12-07 13:26:56 -08:00
gpio_keys_polled.c
hil_kbd.c
hilkbd.c
hpps2atkbd.h
imx_keypad.c Input: imx_keypad - add missing linux/input.h include 2022-09-26 08:15:10 -07:00
imx_sc_key.c
ipaq-micro-keys.c Input: ipaq-micro-keys - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-12-07 13:26:59 -08:00
iqs62x-keys.c Input: iqs62x-keys - drop unused device node references 2022-09-24 22:17:43 -07:00
jornada680_kbd.c
jornada720_kbd.c
lkkbd.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
lm8323.c Input: lm8323 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-12-07 13:27:28 -08:00
lm8333.c Input: lm8333 - Convert to i2c's .probe_new() 2022-12-02 14:53:41 -08:00
locomokbd.c treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
lpc32xx-keys.c Input: lpc32xx-keys - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-12-07 13:27:32 -08:00
maple_keyb.c
matrix_keypad.c Input: matrix-keypad - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-12-07 13:27:35 -08:00
max7359_keypad.c Input: max7359-keypad - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-12-07 13:27:43 -08:00
mcs_touchkey.c Input: mcs-touchkey - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-12-07 13:27:46 -08:00
mpr121_touchkey.c Input: mpr121-touchkey - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-12-07 13:27:05 -08:00
mt6779-keypad.c Input: mt6779-keypad - add missing linux/input.h include 2022-09-26 08:15:03 -07:00
mtk-pmic-keys.c Input: mtk-pmic-keys - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-12-07 13:27:10 -08:00
newtonkbd.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
nomadik-ske-keypad.c Input: nomadik-ske-keypad - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-12-07 13:27:49 -08:00
nspire-keypad.c
omap-keypad.c treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
omap4-keypad.c
opencores-kbd.c
pinephone-keyboard.c Input: pinephone-keyboard - support the proxied I2C bus 2022-10-09 22:26:52 -07:00
pmic8xxx-keypad.c Input: pmic8xxx-keypad - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-12-07 13:27:55 -08:00
pxa27x_keypad.c Input: pxa27x_keypad - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-12-07 13:27:58 -08:00
pxa930_rotary.c
qt1050.c Input: qt1050 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-12-07 13:27:15 -08:00
qt1070.c Input: qt1070 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-12-07 13:28:01 -08:00
qt2160.c Input: qt2160 - Convert to i2c's .probe_new() 2022-12-02 14:53:42 -08:00
samsung-keypad.c
sh_keysc.c Input: sh-keysc - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-12-07 13:28:04 -08:00
snvs_pwrkey.c Input: snvs_pwrkey - fix SNVS_HPVIDR1 register address 2022-09-27 07:18:30 -07:00
spear-keyboard.c Input: spear-keyboard - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-12-07 13:27:20 -08:00
st-keyscan.c Input: st-keyscan - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-12-07 13:28:07 -08:00
stmpe-keypad.c Input: stmpe-keypad - add missing of.h include 2022-10-28 11:56:17 -07:00
stowaway.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
sun4i-lradc-keys.c
sunkbd.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
tc3589x-keypad.c Input: tc3589x - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-12-07 13:28:10 -08:00
tca6416-keypad.c Input: tca6416-keypad - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-12-07 13:28:12 -08:00
tca8418_keypad.c Input: tca8418_keypad - Convert to i2c's .probe_new() 2022-12-02 14:53:42 -08:00
tegra-kbc.c Input: tegra-kbc - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-12-07 13:28:20 -08:00
tm2-touchkey.c Input: tm2-touchkey - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-12-07 13:27:23 -08:00
twl4030_keypad.c
xtkbd.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00