Mike Christie
d04958a348
scsi: iscsi: Fix conn use after free during resets
...
[ Upstream commit ec29d0ac29be366450a7faffbcf8cba3a6a3b506 ]
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/[email protected]
Reviewed-by: Lee Duncan <[email protected] >
Signed-off-by: Mike Christie <[email protected] >
Signed-off-by: Martin K. Petersen <[email protected] >
Signed-off-by: Sasha Levin <[email protected] >
2021-07-20 16:10:43 +02:00
..
fc
SCSI misc on 20190709
2019-07-11 15:14:01 -07:00
fc_encode.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 335
2019-06-05 17:37:06 +02:00
fc_frame.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 335
2019-06-05 17:37:06 +02: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 misc on 20190709
2019-07-11 15:14:01 -07:00
iscsi_proto.h
scsi: Revert "target: iscsi: Wait for all commands to finish before freeing a session"
2020-02-28 17:22:25 +01:00
iser.h
libfc.h
scsi: libfc: Whitespace cleanup in libfc.h
2019-07-29 20:43:06 -04:00
libfcoe.h
Fix misc new gcc warnings
2021-05-11 14:04:16 +02:00
libiscsi.h
scsi: iscsi: Fix conn use after free during resets
2021-07-20 16:10:43 +02:00
libiscsi_tcp.h
SCSI misc on 20190709
2019-07-11 15:14:01 -07:00
libsas.h
SCSI misc on 20190709
2019-07-11 15:14:01 -07:00
sas.h
SCSI misc on 20190709
2019-07-11 15:14:01 -07:00
sas_ata.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156
2019-05-30 11:26:35 -07:00
scsi.h
scsi: libsas: Remove scsi_to_u32()
2019-01-29 00:46:22 -05:00
scsi_bsg_iscsi.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156
2019-05-30 11:26:35 -07:00
scsi_cmnd.h
scsi: core: add support for request batching
2019-07-22 16:44:07 -04:00
scsi_common.h
scsi: target: core: Add CONTROL field for trace events
2020-10-29 09:58:04 +01:00
scsi_dbg.h
scsi: core: Reduce memory required for SCSI logging
2019-08-07 21:47:29 -04:00
scsi_device.h
scsi_devinfo.h
scsi_dh.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156
2019-05-30 11:26:35 -07:00
scsi_driver.h
scsi_eh.h
scsi: core: save/restore command resid for error handling
2019-10-03 21:43:04 -04:00
scsi_host.h
scsi: core: add support for request batching
2019-07-22 16:44:07 -04:00
scsi_ioctl.h
scsi_proto.h
scsi_request.h
scsi_tcq.h
scsi_transport.h
SCSI misc on 20190709
2019-07-11 15:14:01 -07:00
scsi_transport_fc.h
SCSI misc on 20190709
2019-07-11 15:14:01 -07:00
scsi_transport_iscsi.h
scsi: iscsi: Add iscsi_cls_conn refcount helpers
2021-07-20 16:10:43 +02:00
scsi_transport_sas.h
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
scsicam.h
sg.h
srp.h
viosrp.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157
2019-05-30 11:26:37 -07:00