OpenCloudOS-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 Input: adc-keys - drop bogus __refdata annotation 2021-09-03 23:49:58 -07:00
adp5520-keys.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 149 2019-05-30 11:25:18 -07:00
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 Input: add Apple SPI keyboard and trackpad driver 2019-07-19 11:58:34 +03:00
applespi_trace.h Input: add Apple SPI keyboard and trackpad driver 2019-07-19 11:58:34 +03:00
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 Input: remove dev_err() usage after platform_get_irq() 2019-08-14 10:49:01 -07:00
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 Input: goldfish_events - replace zero-length array with flexible-array member 2020-02-13 17:09:47 -08:00
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 Input: gpio_keys_polled - replace zero-length array with flexible-array member 2020-02-14 17:19:19 -08:00
hil_kbd.c Input: hil_kbd - fix error return code in hil_dev_connect() 2021-05-24 20:57:04 -07:00
hilkbd.c parisc: Make struct parisc_driver::remove() return void 2021-08-30 10:18:25 +02:00
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 Input: imx_sc_key - use devm_add_action_or_reset() to handle all cleanups 2020-05-13 10:34:58 -07:00
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 Input: jornada680_kbd - switch to using polled mode of input devices 2019-10-29 17:13:44 -07:00
jornada720_kbd.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
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 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 64 2019-05-24 17:36:46 +02:00
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 Input: nspire-keypad - enable interrupts only when opened 2021-03-23 10:55:10 -07:00
omap-keypad.c treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
omap4-keypad.c Input: omap4-keypad - switch to using pm_runtime_resume_and_get() 2022-05-27 21:38:32 -07:00
opencores-kbd.c Input: remove dev_err() usage after platform_get_irq() 2019-08-14 10:49:01 -07:00
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 remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
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 Input: use input_device_enabled() 2020-12-02 22:10:33 -08:00
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 Input: sun4i-lradc-keys - add support for R329 and D1 2022-05-05 10:23:49 -07:00
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 Input: twl4030_keypad - fix handling of platform_get_irq() error 2020-09-16 10:42:15 -07:00
xtkbd.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00