linux-stable/include/scsi
Mike Christie ec29d0ac29 scsi: iscsi: Fix conn use after free during resets
If we haven't done a unbind target call we can race where
iscsi_conn_teardown wakes up the EH thread and then frees the conn while
those threads are still accessing the conn ehwait.

We can only do one TMF per session so this just moves the TMF fields from
the conn to the session. We can then rely on the
iscsi_session_teardown->iscsi_remove_session->__iscsi_unbind_session call
to remove the target and it's devices, and know after that point there is
no device or scsi-ml callout trying to access the session.

Link: https://lore.kernel.org/r/20210525181821.7617-14-michael.christie@oracle.com
Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-06-02 01:28:21 -04:00
..
fc scsi: scsi_transport_fc: Match HBA Attribute Length with HBAAPI V2.0 definitions 2020-07-15 14:50:23 -04:00
fc_frame.h scsi: libfc: Move scsi/fc_encode.h to libfc 2020-10-29 21:49:25 -04:00
fcoe_sysfs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 335 2019-06-05 17:37:06 +02:00
iscsi_if.h scsi: iscsi: Add support for asynchronous iSCSI session destruction 2020-03-11 23:07:57 -04:00
iscsi_proto.h scsi: Fix spelling mistakes in header files 2021-05-21 17:22:45 -04:00
iser.h IB/iser,isert: Create and use new shared header 2015-12-24 00:17:35 -05:00
libfc.h scsi: Fix spelling mistakes in header files 2021-05-21 17:22:45 -04:00
libfcoe.h Fix misc new gcc warnings 2021-04-27 17:05:53 -07:00
libiscsi.h scsi: iscsi: Fix conn use after free during resets 2021-06-02 01:28:21 -04:00
libiscsi_tcp.h SCSI misc on 20190709 2019-07-11 15:14:01 -07:00
libsas.h scsi: libsas: Remove temporarily-added _gfp() API variants 2021-01-22 21:31:10 -05:00
sas.h scsi: libsas: Replace zero-length array with flexible-array 2020-05-11 22:26:32 -04:00
sas_ata.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
scsi.h scsi: core: Treat device offline as a failure 2021-05-10 13:24:03 -04:00
scsi_bsg_iscsi.h scsi: Fix spelling mistakes in header files 2021-05-21 17:22:45 -04:00
scsi_cmnd.h SCSI misc on 20210428 2021-04-28 17:22:10 -07:00
scsi_common.h scsi: target: core: Add CONTROL field for trace events 2020-10-02 18:36:19 -04:00
scsi_dbg.h scsi: core: Reduce memory required for SCSI logging 2019-08-07 21:47:29 -04:00
scsi_device.h scsi: core: Remove an incorrect comment 2021-04-15 22:44:40 -04:00
scsi_devinfo.h scsi: devinfo: BLIST_RETRY_ASC_C1 for Fujitsu ETERNUS 2018-04-20 19:14:36 -04:00
scsi_dh.h scsi: core: Introduce enum scsi_disposition 2021-04-15 22:44:40 -04:00
scsi_driver.h scsi: return blk_status_t from scsi_init_io and ->init_command 2018-11-09 19:17:14 -07:00
scsi_eh.h scsi: core: Introduce enum scsi_disposition 2021-04-15 22:44:40 -04:00
scsi_host.h SCSI misc on 20210428 2021-04-28 17:22:10 -07:00
scsi_ioctl.h scsi: Replace zero-length array with flexible-array member 2020-03-11 23:07:56 -04:00
scsi_proto.h scsi: target: core: Add the VERSION DESCRIPTOR fields to the INQUIRY data 2021-05-15 14:34:26 -04:00
scsi_request.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
scsi_tcq.h scsi: core: Only return started requests from scsi_host_find_tag() 2020-07-24 22:09:56 -04:00
scsi_transport.h SCSI misc on 20190709 2019-07-11 15:14:01 -07:00
scsi_transport_fc.h scsi: scsi_transport_fc: Add a new rport state FC_PORTSTATE_MARGINAL 2021-01-14 22:55:17 -05:00
scsi_transport_iscsi.h scsi: iscsi: Add iscsi_cls_conn refcount helpers 2021-06-02 01:28:20 -04:00
scsi_transport_sas.h scsi: libsas: direct call probe and destruct 2018-01-10 23:24:02 -05:00
scsi_transport_spi.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
scsi_transport_srp.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
scsicam.h scsi: simplify scsi_partsize 2020-03-24 07:57:07 -06:00
sg.h scsi: Fix spelling mistakes in header files 2021-05-21 17:22:45 -04:00
srp.h scsi: Replace zero-length array with flexible-array member 2020-03-11 23:07:56 -04:00
viosrp.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00