linux-stable/drivers/scsi
Martin Wilck c836374bac scsi: scsi_transport_srp: Don't block target in SRP_PORT_LOST state
[ Upstream commit 5cd0f6f576 ]

rport_dev_loss_timedout() sets the rport state to SRP_PORT_LOST and the
SCSI target state to SDEV_TRANSPORT_OFFLINE. If this races with
srp_reconnect_work(), a warning is printed:

Mar 27 18:48:07 ictm1604s01h4 kernel: dev_loss_tmo expired for SRP port-18:1 / host18.
Mar 27 18:48:07 ictm1604s01h4 kernel: ------------[ cut here ]------------
Mar 27 18:48:07 ictm1604s01h4 kernel: scsi_internal_device_block(18:0:0:100) failed: ret = -22
Mar 27 18:48:07 ictm1604s01h4 kernel: Call Trace:
Mar 27 18:48:07 ictm1604s01h4 kernel:  ? scsi_target_unblock+0x50/0x50 [scsi_mod]
Mar 27 18:48:07 ictm1604s01h4 kernel:  starget_for_each_device+0x80/0xb0 [scsi_mod]
Mar 27 18:48:07 ictm1604s01h4 kernel:  target_block+0x24/0x30 [scsi_mod]
Mar 27 18:48:07 ictm1604s01h4 kernel:  device_for_each_child+0x57/0x90
Mar 27 18:48:07 ictm1604s01h4 kernel:  srp_reconnect_rport+0xe4/0x230 [scsi_transport_srp]
Mar 27 18:48:07 ictm1604s01h4 kernel:  srp_reconnect_work+0x40/0xc0 [scsi_transport_srp]

Avoid this by not trying to block targets for rports in SRP_PORT_LOST
state.

Link: https://lore.kernel.org/r/20210401091105.8046-1-mwilck@suse.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-21 13:00:52 +02:00
..
aacraid
aic7xxx
aic94xx scsi: libsas: Remove notifier indirection 2021-03-25 09:04:11 +01:00
arcmsr
arm
be2iscsi
bfa
bnx2fc scsi: bnx2fc: Fix Kconfig warning & CNIC build errors 2021-03-04 11:38:21 +01:00
bnx2i
csiostor
cxgbi scsi: cxgb4i: Fix TLS dependency 2021-01-06 14:56:51 +01:00
cxlflash
device_handler
dpt
esas2r
fcoe
fnic scsi: fnic: Fix memleak in vnic_dev_init_devcmd2 2021-02-07 15:37:14 +01:00
hisi_sas scsi: libsas: Remove notifier indirection 2021-03-25 09:04:11 +01:00
ibmvscsi scsi: ibmvfc: Set default timeout to avoid crash during migration 2021-02-07 15:37:15 +01:00
ibmvscsi_tgt
isci scsi: isci: Pass gfp_t flags in isci_port_bc_change_received() 2021-03-25 09:04:12 +01:00
libfc scsi: libfc: Avoid invoking response handler twice if ep is already completed 2021-02-07 15:37:14 +01:00
libsas scsi: libsas: Introduce a _gfp() variant of event notifiers 2021-03-25 09:04:11 +01:00
lpfc scsi: lpfc: Fix some error codes in debugfs 2021-03-25 09:04:09 +01:00
megaraid scsi: megaraid_sas: Fix MEGASAS_IOC_FIRMWARE regression 2021-01-27 11:55:06 +01:00
mpt3sas scsi: mpt3sas: Fix error return code of mpt3sas_base_attach() 2021-03-30 14:32:07 +02:00
mvsas scsi: mvsas: Pass gfp_t flags to libsas event notifiers 2021-03-25 09:04:11 +01:00
pcmcia
pm8001 scsi: pm80xx: Fix chip initialization failure 2021-04-14 08:42:03 +02:00
qedf
qedi scsi: qedi: Fix error return code of qedi_alloc_global_queues() 2021-03-30 14:32:07 +02:00
qla2xxx scsi: qla2xxx: Fix broken #endif placement 2021-04-07 15:00:05 +02:00
qla4xxx
smartpqi
snic
sym53c8xx_2
ufs scsi: ufs: core: Fix wrong Task Tag used in task management request UPIUs 2021-04-14 08:42:10 +02:00
.gitignore
3w-9xxx.c
3w-9xxx.h
3w-sas.c
3w-sas.h
3w-xxxx.c
3w-xxxx.h
53c700.c
53c700.h
53c700.scr
53c700_d.h_shipped
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
BusLogic.c
BusLogic.h
bvme6000_scsi.c
ch.c
constants.c
dc395x.c
dc395x.h
dmx3191d.c
dpt_i2o.c
dpti.h
esp_scsi.c
esp_scsi.h
fdomain.c
fdomain.h
fdomain_isa.c
fdomain_pci.c
FlashPoint.c
g_NCR5380.c
gdth.c
gdth.h
gdth_ioctl.h
gdth_proc.c
gdth_proc.h
gvp11.c
gvp11.h
hosts.c
hpsa.c
hpsa.h
hpsa_cmd.h
hptiop.c
hptiop.h
imm.c
imm.h
initio.c
initio.h
ipr.c
ipr.h
ips.c
ips.h
iscsi_boot_sysfs.c
iscsi_tcp.c
iscsi_tcp.h
jazz_esp.c
Kconfig
lasi700.c
libiscsi.c scsi: libiscsi: Fix iscsi_prep_scsi_cmd_pdu() error handling 2021-03-17 17:06:25 +01:00
libiscsi_tcp.c
mac53c94.c
mac53c94.h
mac_esp.c
mac_scsi.c
Makefile
megaraid.c
megaraid.h
mesh.c
mesh.h
mvme16x_scsi.c
mvme147.c
mvme147.h
mvumi.c
mvumi.h
myrb.c
myrb.h
myrs.c scsi: myrs: Fix a double free in myrs_cleanup() 2021-03-25 09:04:09 +01:00
myrs.h
ncr53c8xx.c
ncr53c8xx.h
NCR5380.c
NCR5380.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
qlogicpti.h
raid_class.c
script_asm.pl
scsi.c
scsi.h
scsi_common.c
scsi_debug.c scsi: scsi_debug: Fix a memory leak 2021-02-17 11:02:27 +01:00
scsi_debugfs.c
scsi_debugfs.h
scsi_devinfo.c
scsi_dh.c
scsi_error.c
scsi_ioctl.c
scsi_lib.c scsi: core: Only process PM requests if rpm_status != RPM_ACTIVE 2021-01-12 20:18:16 +01:00
scsi_lib_dma.c
scsi_logging.c
scsi_logging.h
scsi_netlink.c
scsi_pm.c
scsi_priv.h
scsi_proc.c
scsi_sas_internal.h
scsi_scan.c
scsi_sysctl.c
scsi_sysfs.c
scsi_trace.c
scsi_transport_api.h
scsi_transport_fc.c
scsi_transport_iscsi.c scsi: iscsi: Verify lengths on passthrough PDUs 2021-03-07 12:34:14 +01:00
scsi_transport_sas.c
scsi_transport_spi.c scsi: scsi_transport_spi: Set RQF_PM for domain validation commands 2021-01-12 20:18:15 +01:00
scsi_transport_srp.c scsi: scsi_transport_srp: Don't block target in SRP_PORT_LOST state 2021-04-21 13:00:52 +02:00
scsicam.c
sd.c scsi: sd: Fix Opal support 2021-03-04 11:38:22 +01:00
sd.h
sd_dif.c
sd_zbc.c scsi: sd: sd_zbc: Don't pass GFP_NOIO to kvcalloc 2021-03-04 11:38:21 +01:00
sense_codes.h
ses.c
sg.c
sgiwd93.c
sim710.c
sni_53c710.c
sr.c
sr.h
sr_ioctl.c
sr_vendor.c
st.c scsi: st: Fix a use after free in st_open() 2021-04-07 15:00:05 +02:00
st.h
st_options.h
stex.c
storvsc_drv.c
sun3_scsi.c
sun3_scsi_vme.c
sun3x_esp.c
sun_esp.c
virtio_scsi.c
vmw_pvscsi.c
vmw_pvscsi.h
wd33c93.c
wd33c93.h
wd719x.c
wd719x.h
xen-scsifront.c
zalon.c
zorro7xx.c
zorro_esp.c