WSL2-Linux-Kernel/drivers/scsi
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
..
aacraid
aic7xxx scsi: aic79xx: Use __ro_after_init explicitly 2022-09-15 22:01:24 -04:00
aic94xx
arcmsr
arm
be2iscsi
bfa scsi: bfa: Replace one-element array with flexible-array member 2022-11-17 18:15:45 +00:00
bnx2fc
bnx2i
csiostor scsi: csiostor: Remove unused variable 'n' 2022-11-08 03:40:54 +00:00
cxgbi treewide: use get_random_u32() when possible 2022-10-11 17:42:58 -06:00
cxlflash driver core: fix up missed scsi/cxlflash class.devnode() conversion. 2022-11-30 13:00:29 +01:00
device_handler scsi: device_handler: alua: Call scsi_device_put() from non-atomic context 2022-11-26 00:35:16 +00:00
elx scsi: efct: Fix possible memleak in efct_device_init() 2022-11-25 23:50:35 +00:00
esas2r scsi: esas2r: Introduce scsi_template_proc_dir() 2022-10-18 03:17:09 +00:00
fcoe SCSI misc on 20221213 2022-12-14 08:58:51 -08:00
fnic
hisi_sas scsi: hisi_sas: Fix SATA devices missing issue during I_T nexus reset 2022-11-26 02:26:02 +00:00
ibmvscsi scsi: ibmvfc: Avoid path failures during live migration 2022-11-07 18:57:39 +00:00
ibmvscsi_tgt scsi: ibmvscsi_tgt: Fix repeated words in comment 2022-09-15 22:30:26 -04:00
isci
libfc scsi: libfc: Include the correct header 2022-12-01 03:03:36 +00:00
libsas SCSI misc on 20221213 2022-12-14 08:58:51 -08:00
lpfc SCSI misc on 20221213 2022-12-14 08:58:51 -08:00
megaraid SCSI misc on 20221213 2022-12-14 08:58:51 -08:00
mpi3mr scsi: mpi3mr: Suppress command reply debug prints 2022-11-17 17:42:38 +00:00
mpt3sas SCSI misc on 20221213 2022-12-14 08:58:51 -08:00
mvsas scsi: mvsas: Use sas_task_find_rq() for tagging 2022-10-22 03:02:52 +00:00
pcmcia scsi: pcmcia: nsp_cs: Remove unused variable i 2022-10-27 02:15:46 +00:00
pm8001 SCSI misc on 20221213 2022-12-14 08:58:51 -08:00
qedf scsi: qedf: Remove set but unused variable 'page' 2022-10-22 03:09:45 +00:00
qedi treewide: use get_random_u32_below() instead of deprecated function 2022-11-18 02:15:15 +01:00
qla2xxx treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
qla4xxx scsi: core: Change the return type of .eh_timed_out() 2022-10-22 03:25:59 +00:00
smartpqi scsi: smartpqi: Change version to 2.1.20-035 2022-11-17 18:10:59 +00:00
snic scsi: snic: Fix possible UAF in snic_tgt_create() 2022-11-26 00:30:05 +00:00
sym53c8xx_2
.gitignore
3w-9xxx.c scsi: 3w-9xxx: Avoid disabling device if failing to enable it 2022-09-06 22:22:24 -04:00
3w-9xxx.h
3w-sas.c
3w-sas.h
3w-xxxx.c scsi: 3w-xxxx: Replace one-element array with flexible-array member 2022-09-25 13:06:00 -04:00
3w-xxxx.h scsi: 3w-xxxx: Replace one-element array with flexible-array member 2022-09-25 13:06:00 -04:00
53c700.c
53c700.h
53c700.scr
53c700_d.h_shipped
BusLogic.c scsi: BusLogic: Remove variable 'adapter_count' 2022-11-08 03:01:12 +00:00
BusLogic.h
FlashPoint.c
Kconfig scsi: core: Make SCSI_MOD depend on BLOCK for cleaner .config files 2022-09-25 12:46:59 -04:00
Makefile
NCR5380.c scsi: NCR5380: Fix repeated words in comment 2022-11-08 02:57:01 +00:00
NCR5380.h
a100u2w.c
a100u2w.h
a2091.c
a2091.h
a3000.c
a3000.h
a4000t.c
advansys.c
aha152x.c
aha152x.h
aha1542.c
aha1542.h
aha1740.c
aha1740.h
am53c974.c
atari_scsi.c
atp870u.c
atp870u.h
bvme6000_scsi.c
ch.c
constants.c
dc395x.c
dc395x.h
dmx3191d.c
esp_scsi.c
esp_scsi.h
fdomain.c
fdomain.h
fdomain_isa.c
fdomain_pci.c
g_NCR5380.c
gvp11.c
gvp11.h
hosts.c scsi: core: Fail host creation if creating the proc directory fails 2022-10-18 03:17:09 +00:00
hpsa.c scsi: hpsa: Fix possible memory leak in hpsa_add_sas_device() 2022-11-25 23:36:23 +00:00
hpsa.h
hpsa_cmd.h
hptiop.c scsi: hptiop: Use struct_size() helper in code related to struct hpt_iop_request_scsi_command 2022-09-25 13:02:23 -04:00
hptiop.h scsi: hptiop: Replace one-element array with flexible-array member in struct hpt_iop_request_ioctl_command() 2022-09-25 13:04:17 -04:00
imm.c
imm.h
initio.c scsi: initio: Remove redundant assignment to pointer scb 2022-08-31 23:39:57 -04:00
initio.h
ipr.c scsi: ipr: Fix WARNING in ipr_init() 2022-11-26 00:07:37 +00:00
ipr.h
ips.c
ips.h
iscsi_boot_sysfs.c
iscsi_tcp.c Treewide: Stop corrupting socket's task_frag 2022-12-19 17:28:49 -08:00
iscsi_tcp.h scsi: iscsi: iscsi_tcp: Fix null-ptr-deref while calling getpeername() 2022-09-25 14:27:47 -04:00
jazz_esp.c
lasi700.c
libiscsi.c scsi: core: Change the return type of .eh_timed_out() 2022-10-22 03:25:59 +00:00
libiscsi_tcp.c
mac53c94.c
mac53c94.h
mac_esp.c
mac_scsi.c
megaraid.c
megaraid.h
mesh.c
mesh.h
mvme16x_scsi.c
mvme147.c
mvme147.h
mvumi.c scsi: core: Change the return type of .eh_timed_out() 2022-10-22 03:25:59 +00:00
mvumi.h
myrb.c
myrb.h
myrs.c
myrs.h
ncr53c8xx.c
ncr53c8xx.h
nsp32.c
nsp32.h
nsp32_debug.c
nsp32_io.h
pmcraid.c
pmcraid.h
ppa.c
ppa.h
ps3rom.c
qla1280.c
qla1280.h
qlogicfas.c
qlogicfas408.c
qlogicfas408.h
qlogicpti.c scsi: qlogicpti: Fix dma_map_sg() check 2022-09-06 22:14:14 -04:00
qlogicpti.h
raid_class.c
script_asm.pl
scsi.c scsi: core: Release SCSI devices synchronously 2022-10-18 03:20:31 +00:00
scsi_bsg.c
scsi_common.c
scsi_debug.c SCSI misc on 20221213 2022-12-14 08:58:51 -08:00
scsi_debugfs.c
scsi_debugfs.h
scsi_devinfo.c
scsi_dh.c
scsi_error.c SCSI misc on 20221213 2022-12-14 08:58:51 -08:00
scsi_ioctl.c scsi: core: Rename status_byte to sg_status_byte 2022-12-01 03:22:23 +00:00
scsi_lib.c SCSI misc on 20221213 2022-12-14 08:58:51 -08:00
scsi_lib_dma.c
scsi_logging.c
scsi_logging.h
scsi_netlink.c
scsi_pm.c
scsi_priv.h scsi: core: Introduce a new list for SCSI proc directory entries 2022-10-18 03:17:09 +00:00
scsi_proc.c scsi: core: Introduce a new list for SCSI proc directory entries 2022-10-18 03:17:09 +00:00
scsi_sas_internal.h
scsi_scan.c SCSI misc on 20221213 2022-12-14 08:58:51 -08:00
scsi_sysctl.c
scsi_sysfs.c SCSI misc on 20221213 2022-12-14 08:58:51 -08:00
scsi_trace.c
scsi_transport_api.h
scsi_transport_fc.c scsi: core: Change the return type of .eh_timed_out() 2022-10-22 03:25:59 +00:00
scsi_transport_iscsi.c SCSI misc on 20221213 2022-12-14 08:58:51 -08:00
scsi_transport_sas.c scsi: scsi_transport_sas: Fix error handling in sas_phy_add() 2022-11-08 01:52:52 +00:00
scsi_transport_spi.c freezer: Have {,un}lock_system_sleep() save/restore flags 2022-09-07 21:53:48 +02:00
scsi_transport_srp.c scsi: core: Change the return type of .eh_timed_out() 2022-10-22 03:25:59 +00:00
scsicam.c
sd.c scsi: sd: Convert SCSI errors to PR errors 2022-12-01 03:22:23 +00:00
sd.h scsi: sd: Revert "Rework asynchronous resume support" 2022-08-22 22:45:25 -04:00
sd_dif.c
sd_trace.h scsi: sd: sd_zbc: Trace zone append emulation 2022-12-01 03:13:55 +00:00
sd_zbc.c scsi: sd: sd_zbc: Trace zone append emulation 2022-12-01 03:13:55 +00:00
sense_codes.h
ses.c
sg.c SCSI misc on 20221222 2022-12-22 11:22:31 -08:00
sgiwd93.c
sim710.c
sni_53c710.c
sr.c
sr.h
sr_ioctl.c
sr_vendor.c
st.c SCSI misc on 20221007 2022-10-07 12:33:18 -07:00
st.h
st_options.h
stex.c scsi: stex: Properly zero out the passthrough command structure 2022-09-25 14:15:03 -04:00
storvsc_drv.c SCSI misc on 20221213 2022-12-14 08:58:51 -08:00
sun3_scsi.c
sun3_scsi_vme.c
sun3x_esp.c
sun_esp.c
virtio_scsi.c scsi: core: Change the return type of .eh_timed_out() 2022-10-22 03:25:59 +00:00
vmw_pvscsi.c
vmw_pvscsi.h
wd33c93.c scsi: wd33c93: Remove dead code related to the long-gone config WD33C93_PIO 2022-09-25 13:29:53 -04:00
wd33c93.h scsi: wd33c93: Remove dead code related to the long-gone config WD33C93_PIO 2022-09-25 13:29:53 -04:00
wd719x.c
wd719x.h
xen-scsifront.c scsi: xen: Drop use of internal host codes 2022-09-06 22:05:58 -04:00
zalon.c
zorro7xx.c
zorro_esp.c