WSL2-Linux-Kernel/drivers/hid
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
..
amd-sfh-hid HID: amd_sfh: Add missing check for dma_alloc_coherent 2022-12-20 09:45:53 +01:00
i2c-hid for-linus-2022121301 2022-12-13 13:32:56 -08:00
intel-ish-hid
surface-hid
usbhid
.kunitconfig
Kconfig HID: playstation: fix free of uninialized pointer for DS4 in Bluetooth. 2022-12-19 13:18:02 +01:00
Makefile
hid-a4tech.c
hid-accutouch.c
hid-alps.c
hid-apple.c
hid-appleir.c
hid-asus.c
hid-aureal.c
hid-axff.c
hid-belkin.c
hid-betopff.c
hid-bigbenff.c
hid-cherry.c
hid-chicony.c
hid-cmedia.c
hid-core.c
hid-corsair.c
hid-cougar.c
hid-cp2112.c
hid-creative-sb0540.c
hid-cypress.c
hid-debug.c
hid-dr.c
hid-elan.c
hid-elecom.c
hid-elo.c
hid-emsff.c
hid-ezkey.c
hid-ft260.c
hid-gaff.c
hid-gembird.c
hid-generic.c
hid-gfrm.c
hid-glorious.c
hid-google-hammer.c
hid-gt683r.c
hid-gyration.c
hid-holtek-kbd.c
hid-holtek-mouse.c
hid-holtekff.c
hid-hyperv.c
hid-icade.c
hid-ids.h HID: plantronics: Additional PIDs for double volume key presses quirk 2022-12-20 15:35:21 +01:00
hid-input.c HID: Ignore HP Envy x360 eu0009nv stylus battery 2022-12-20 15:33:37 +01:00
hid-ite.c
hid-jabra.c
hid-kensington.c
hid-keytouch.c
hid-kye.c
hid-lcpower.c
hid-led.c
hid-lenovo.c
hid-letsketch.c
hid-lg-g15.c
hid-lg.c
hid-lg.h
hid-lg2ff.c
hid-lg3ff.c
hid-lg4ff.c
hid-lg4ff.h
hid-lgff.c
hid-logitech-dj.c
hid-logitech-hidpp.c HID: logitech-hidpp: Guard FF init code against non-USB devices 2022-12-19 12:06:44 +01:00
hid-macally.c
hid-magicmouse.c
hid-maltron.c
hid-mcp2221.c HID: mcp2221: don't connect hidraw 2022-12-19 13:12:24 +01:00
hid-megaworld.c
hid-mf.c
hid-microsoft.c
hid-monterey.c
hid-multitouch.c HID: multitouch: fix Asus ExpertBook P2 P2451FA trackpoint 2022-12-20 15:34:16 +01:00
hid-nintendo.c
hid-nti.c
hid-ntrig.c
hid-ortek.c
hid-penmount.c
hid-petalynx.c
hid-picolcd.h
hid-picolcd_backlight.c
hid-picolcd_cir.c
hid-picolcd_core.c
hid-picolcd_debugfs.c
hid-picolcd_fb.c
hid-picolcd_lcd.c
hid-picolcd_leds.c
hid-pl.c
hid-plantronics.c HID: plantronics: Additional PIDs for double volume key presses quirk 2022-12-20 15:35:21 +01:00
hid-playstation.c HID: playstation: fix free of uninialized pointer for DS4 in Bluetooth. 2022-12-19 13:18:02 +01:00
hid-primax.c
hid-prodikeys.c
hid-pxrc.c
hid-quirks.c
hid-razer.c
hid-redragon.c
hid-retrode.c
hid-rmi.c
hid-roccat-arvo.c
hid-roccat-arvo.h
hid-roccat-common.c
hid-roccat-common.h
hid-roccat-isku.c
hid-roccat-isku.h
hid-roccat-kone.c
hid-roccat-kone.h
hid-roccat-koneplus.c
hid-roccat-koneplus.h
hid-roccat-konepure.c
hid-roccat-kovaplus.c
hid-roccat-kovaplus.h
hid-roccat-lua.c
hid-roccat-lua.h
hid-roccat-pyra.c
hid-roccat-pyra.h
hid-roccat-ryos.c
hid-roccat-savu.c
hid-roccat-savu.h
hid-roccat.c
hid-saitek.c
hid-samsung.c
hid-semitek.c
hid-sensor-custom.c
hid-sensor-hub.c
hid-sigmamicro.c
hid-sjoy.c
hid-sony.c HID: sony: Fix unused function warning 2022-12-20 15:37:52 +01:00
hid-speedlink.c
hid-steam.c
hid-steelseries.c
hid-sunplus.c
hid-thrustmaster.c
hid-tivo.c
hid-tmff.c
hid-topre.c
hid-topseed.c
hid-twinhan.c
hid-u2fzero.c
hid-uclogic-core.c
hid-uclogic-params-test.c
hid-uclogic-params.c
hid-uclogic-params.h
hid-uclogic-rdesc-test.c
hid-uclogic-rdesc.c Merge branch 'for-6.2/uclogic' into for-linus 2022-12-13 14:42:10 +01:00
hid-uclogic-rdesc.h
hid-udraw-ps3.c
hid-viewsonic.c
hid-vivaldi-common.c
hid-vivaldi-common.h
hid-vivaldi.c
hid-vrc2.c
hid-waltop.c
hid-wiimote-core.c treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
hid-wiimote-debug.c
hid-wiimote-modules.c
hid-wiimote.h
hid-xiaomi.c
hid-xinmo.c
hid-zpff.c
hid-zydacron.c
hidraw.c
uhid.c
wacom.h
wacom_sys.c HID: wacom: Ensure bootloader PID is usable in hidraw mode 2022-12-20 15:29:10 +01:00
wacom_wac.c HID: wacom: Ensure bootloader PID is usable in hidraw mode 2022-12-20 15:29:10 +01:00
wacom_wac.h HID: wacom: Ensure bootloader PID is usable in hidraw mode 2022-12-20 15:29:10 +01:00