linux/drivers/net/wireless/intel/iwlwifi/mvm
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
..
binding.c
coex.c wifi: mac80211: move interface config to new struct 2022-06-20 12:55:03 +02:00
constants.h
d3.c wifi: iwlwifi: mvm: d3: add TKIP to the GTK iterator 2022-12-07 17:36:36 +02:00
debugfs-vif.c wifi: mac80211: move some future per-link data to bss_conf 2022-06-20 12:55:01 +02:00
debugfs.c wifi: iwlwifi: mvm: Fix getting the lowest rate 2022-11-10 13:26:56 +02:00
debugfs.h
ftm-initiator.c wifi: iwlwifi: mvm: replace usage of found with dedicated list iterator variable 2022-12-07 17:36:08 +02:00
ftm-responder.c wifi: mac80211: move some future per-link data to bss_conf 2022-06-20 12:55:01 +02:00
fw-api.h
fw.c wifi: iwlwifi: dump: Update check for UMAC valid FW address 2022-12-07 17:36:43 +02:00
led.c
mac-ctxt.c Networking changes for 6.2. 2022-12-13 15:47:48 -08:00
mac80211.c wifi: iwlwifi: mvm: trigger PCI re-enumeration in case of PLDR sync 2022-11-28 17:53:58 +02:00
Makefile wifi: iwlwifi: mvm: support new key API 2022-11-10 13:26:51 +02:00
mld-key.c wifi: iwlwifi: mvm: support new key API 2022-11-10 13:26:51 +02:00
mvm.h wifi: iwlwifi: mvm: trigger PCI re-enumeration in case of PLDR sync 2022-11-28 17:53:58 +02:00
nvm.c
offloading.c wifi: mac80211: move interface config to new struct 2022-06-20 12:55:03 +02:00
ops.c wifi: iwlwifi: mvm: Don't use deprecated register 2022-12-07 17:36:25 +02:00
phy-ctxt.c wifi: iwlwifi: mvm: support 320 MHz PHY configuration 2022-11-28 17:53:01 +02:00
power.c wifi: mac80211: move ps setting to vif config 2022-07-15 11:43:15 +02:00
quota.c wifi: mac80211: move interface config to new struct 2022-06-20 12:55:03 +02:00
rfi.c
rs-fw.c wifi: iwlwifi: rs: add support for parsing max MCS per NSS/BW in 11be 2022-11-28 17:53:06 +02:00
rs.c wifi: mac80211: keep A-MSDU data in sta and per-link 2022-09-06 10:17:08 +02:00
rs.h
rx.c iwlwifi: mvm: always tell the firmware to accept MCAST frames in BSS 2022-05-18 12:54:08 +02:00
rxmq.c wifi: iwlwifi: mvm: don't access packet before checking len 2022-12-07 17:35:58 +02:00
scan.c wifi: iwlwifi: Track scan_cmd allocation size explicitly 2022-09-28 09:43:58 +03:00
sf.c wifi: mac80211: move interface config to new struct 2022-06-20 12:55:03 +02:00
sta.c treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
sta.h
tdls.c wifi: mac80211: move some future per-link data to bss_conf 2022-06-20 12:55:01 +02:00
testmode.h
time-event.c wifi: iwlwifi: mvm: replace usage of found with dedicated list iterator variable 2022-12-07 17:36:08 +02:00
time-event.h
tt.c
tx.c wifi: iwlwifi: mvm: fix double free on tx path. 2022-11-28 17:53:45 +02:00
utils.c wifi: mac80211: make some SMPS code MLD-aware 2022-06-20 12:55:30 +02:00
vendor-cmd.c