linux/drivers/net/wireless
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
..
admtek wifi: mac80211: add wake_tx_queue callback to drivers 2022-10-10 11:00:03 +02:00
ath wifi: ath10k: fix QCOM_SMEM dependency 2022-12-02 20:24:06 +02:00
atmel wifi: atmel: Fix atmel_private_handler array size 2022-11-01 12:30:22 +02:00
broadcom treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
cisco wireless-next patches for v6.2 2022-11-18 11:44:36 +00:00
intel treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
intersil treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
marvell treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
mediatek net: ethernet: mtk_wed: add reset to rx_ring_setup callback 2022-12-06 20:40:53 -08:00
microchip treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
purelifi wifi: plfxlc: fix potential memory leak in __lf_x_usb_enable_rx() 2022-11-28 15:56:17 +02:00
quantenna treewide: use get_random_u32() when possible 2022-10-11 17:42:58 -06:00
ralink Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-11-10 17:43:53 -08:00
realtek wifi: rtl8xxxu: fixing IQK failures for rtl8192eu 2022-12-08 16:53:35 +02:00
rsi wifi: rsi: Fix handling of 802.3 EAPOL frames sent via control port 2022-11-08 09:41:02 +02:00
silabs wifi: mac80211: add wake_tx_queue callback to drivers 2022-10-10 11:00:03 +02:00
st wireless-next patches for v6.2 2022-10-28 18:31:40 -07:00
ti wifi: wl1251: switch to using gpiod API 2022-11-16 11:37:37 +02:00
zydas wifi: zd1201: Avoid clashing function prototypes 2022-11-16 11:31:47 +02:00
Kconfig wireless: add plfxlc driver for pureLiFi X, XL, XC devices 2022-04-25 15:30:42 +03:00
mac80211_hwsim.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-11-10 17:43:53 -08:00
mac80211_hwsim.h wifi: mac80211_hwsim: support creating MLO-capable radios 2022-06-20 12:57:09 +02:00
Makefile wireless: Fix Makefile to be in alphabetical order 2022-05-17 18:29:49 +03:00
ray_cs.c wifi: ray_cs: Drop useless status variable in parse_addr() 2022-06-08 11:08:34 +03:00
ray_cs.h
rayctl.h
rndis_wlan.c wifi: rndis_wlan: fix array of flexible structures warning 2022-09-22 09:08:53 +03:00
virt_wifi.c wifi: virt_wifi: fix typo in comment 2022-06-10 15:35:49 +02:00
wl3501_cs.c wifi: move from strlcpy with unused retval to strscpy 2022-09-02 11:47:22 +03:00
wl3501.h