kernel-fxtec-pro1x/drivers/scsi/fnic
Hannes Reinecke 17176e58b0 scsi: fnic: do not queue commands during fwreset
[ Upstream commit 0e2209629fec427ba75a6351486153a9feddd36b ]

When a link is going down the driver will be calling fnic_cleanup_io(),
which will traverse all commands and calling 'done' for each found command.
While the traversal is handled under the host_lock, calling 'done' happens
after the host_lock is being dropped.

As fnic_queuecommand_lck() is being called with the host_lock held, it
might well be that it will pick the command being selected for abortion
from the above routine and enqueue it for sending, but then 'done' is being
called on that very command from the above routine.

Which of course confuses the hell out of the scsi midlayer.

So fix this by not queueing commands when fnic_cleanup_io is active.

Link: https://lore.kernel.org/r/20200116102053.62755-1-hare@suse.de
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-02-05 14:43:49 +00:00
..
cq_desc.h
cq_enet_desc.h
cq_exch_desc.h
fcpio.h
fnic.h
fnic_attrs.c
fnic_debugfs.c
fnic_fcs.c
fnic_fip.h
fnic_io.h
fnic_isr.c
fnic_main.c
fnic_res.c
fnic_res.h
fnic_scsi.c scsi: fnic: do not queue commands during fwreset 2020-02-05 14:43:49 +00:00
fnic_stats.h
fnic_trace.c
fnic_trace.h
Makefile
rq_enet_desc.h
vnic_cq.c
vnic_cq.h
vnic_cq_copy.h
vnic_dev.c
vnic_dev.h
vnic_devcmd.h
vnic_intr.c
vnic_intr.h
vnic_nic.h
vnic_resource.h
vnic_rq.c
vnic_rq.h
vnic_scsi.h
vnic_stats.h
vnic_wq.c
vnic_wq.h
vnic_wq_copy.c
vnic_wq_copy.h
wq_enet_desc.h