linux/drivers/scsi/qla2xxx
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
Makefile scsi: qla2xxx: edif: Add start + stop bsgs 2021-07-27 00:06:42 -04:00
qla_attr.c scsi: qla2xxx: Use transport-defined speed mask for supported_speeds 2022-10-01 05:54:07 -04:00
qla_bsg.c scsi: qla2xxx: Add NVMe parameters support in Auxiliary Image Status 2022-09-01 00:30:55 -04:00
qla_bsg.h scsi: qla2xxx: Add NVMe parameters support in Auxiliary Image Status 2022-09-01 00:30:55 -04:00
qla_dbg.c scsi: qla2xxx: Enhance driver tracing with separate tunable and more 2022-09-01 00:30:55 -04:00
qla_dbg.h scsi: qla2xxx: Enhance driver tracing with separate tunable and more 2022-09-01 00:30:55 -04:00
qla_def.h scsi: qla2xxx: Fix set-but-not-used variable warnings 2022-11-08 03:38:11 +00:00
qla_devtbl.h
qla_dfs.c scsi: qla2xxx: Add debugfs create/delete helpers 2022-09-01 00:30:55 -04:00
qla_dsd.h
qla_edif_bsg.h scsi: qla2xxx: edif: Synchronize NPIV deletion with authentication application 2022-06-07 21:50:10 -04:00
qla_edif.c treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
qla_edif.h scsi: qla2xxx: edif: Fix session thrash 2022-06-10 13:04:04 -04:00
qla_fw.h scsi: qla2xxx: Add NVMe parameters support in Auxiliary Image Status 2022-09-01 00:30:55 -04:00
qla_gbl.h scsi: qla2xxx: Remove unused declarations for qla2xxx 2022-09-15 21:46:46 -04:00
qla_gs.c scsi: qla2xxx: Update manufacturer details 2022-07-18 22:33:04 -04:00
qla_init.c scsi: qla2xxx: Fix crash when I/O abort times out 2022-12-01 03:32:37 +00:00
qla_inline.h scsi: qla2xxx: Fix set-but-not-used variable warnings 2022-11-08 03:38:11 +00:00
qla_iocb.c scsi: qla2xxx: edif: Fix no logout on delete for N2N 2022-06-10 13:04:04 -04:00
qla_isr.c scsi: qla2xxx: Fix response queue handler reading stale packets 2022-09-01 00:30:55 -04:00
qla_mbx.c scsi: qla2xxx: Fix discovery issues in FC-AL topology 2022-07-18 22:33:03 -04:00
qla_mid.c scsi: qla2xxx: edif: Synchronize NPIV deletion with authentication application 2022-06-07 21:50:10 -04:00
qla_mr.c scsi: qla2xxx: Implement ref count for SRB 2022-01-24 23:57:30 -05:00
qla_mr.h scsi: qla2xxx: Suppress Coverity complaints about dseg_r* 2021-03-24 21:47:20 -04:00
qla_nvme.c block: Change the return type of blk_mq_map_queues() into void 2022-08-22 10:07:53 -06:00
qla_nvme.h scsi: qla2xxx: Increase max limit of ql2xnvme_queues 2022-03-15 00:29:15 -04:00
qla_nx2.c scsi: qla2xxx: Use named initializers for q_dev_state 2022-02-22 21:11:07 -05:00
qla_nx2.h
qla_nx.c scsi: qla2xxx: Use named initializers for q_dev_state 2022-02-22 21:11:07 -05:00
qla_nx.h scsi: qla2xxx: Use named initializers for q_dev_state 2022-02-22 21:11:07 -05:00
qla_os.c scsi: qla2xxx: Remove duplicate of vha->iocb_work initialization 2022-11-26 00:18:21 +00:00
qla_settings.h
qla_sup.c scsi: qla2xxx: Add devids and conditionals for 28xx 2022-01-24 23:57:32 -05:00
qla_target.c scsi: qla2xxx: Initialize vha->unknown_atio_[list, work] for NPIV hosts 2022-11-26 00:27:40 +00:00
qla_target.h scsi: qla2xxx: Remove unused declarations for qla2xxx 2022-09-15 21:46:46 -04:00
qla_tmpl.c scsi: qla2xxx: Fix premature hw access after PCI error 2022-01-24 23:57:30 -05:00
qla_tmpl.h
qla_version.h scsi: qla2xxx: Update version to 10.02.07.900-k 2022-09-01 00:30:56 -04:00
tcm_qla2xxx.c scsi: target: qla2xxx: Replace enable attr with ops.enable 2021-10-04 23:27:38 -04:00
tcm_qla2xxx.h