linux/drivers/scsi/qla2xxx
Mauricio Faria de Oliveira 04dfaa53a0 scsi: qla2xxx: do not queue commands when unloading
When the driver is unloading, in qla2x00_remove_one(), there is a single
call/point in time to abort ongoing commands, qla2x00_abort_all_cmds(),
which is still several steps away from the call to scsi_remove_host().

If more commands continue to arrive and be processed during that
interval, when the driver is tearing down and releasing its structures,
it might potentially hit an oops due to invalid memory access:

    Unable to handle kernel paging request for data at address 0x00000138
    <...>
    NIP [d000000004700a40] qla2xxx_queuecommand+0x80/0x3f0 [qla2xxx]
    LR [d000000004700a10] qla2xxx_queuecommand+0x50/0x3f0 [qla2xxx]

So, fail commands in qla2xxx_queuecommand() if the UNLOADING bit is set.

Signed-off-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2016-11-08 19:13:07 -05:00
..
Kconfig tcm_qla2xxx Add SCSI command jammer/discard capability 2016-05-10 01:27:17 -07:00
Makefile
qla_attr.c qla2xxx: Disable the adapter and skip error recovery in case of register disconnect. 2016-07-15 15:35:50 -04:00
qla_bsg.c qla2xxx: Add bsg interface to support statistics counter reset. 2016-07-15 15:35:37 -04:00
qla_bsg.h qla2xxx: Add bsg interface to support statistics counter reset. 2016-07-15 15:35:37 -04:00
qla_dbg.c qla2xxx: Fix duplicate message id. 2016-07-15 15:35:51 -04:00
qla_dbg.h
qla_def.h scsi: qla2xxx: Use struct t10_pi_tuple 2016-09-15 09:41:56 -04:00
qla_devtbl.h
qla_dfs.c qla2xxx: Add DebugFS node for target sess list. 2016-03-10 21:48:27 -08:00
qla_fw.h qla2xxx: Fix BBCR offset 2016-07-15 15:35:51 -04:00
qla_gbl.h qla2xxx: Add bsg interface to support D_Port Diagnostics. 2016-07-15 15:31:31 -04:00
qla_gs.c qla2xxx: Remove __constant_ prefix 2015-08-26 10:40:32 -07:00
qla_init.c qla2xxx: Let DPORT be enabled purely by nvram. 2016-07-15 15:35:48 -04:00
qla_inline.h qla2xxx: Avoid side effects when using endianizer macros. 2016-02-23 21:27:02 -05:00
qla_iocb.c qla2xxx: Added interface to send explicit LOGO. 2016-01-07 13:57:43 -08:00
qla_isr.c scsi: qla2xxx: Use struct t10_pi_tuple 2016-09-15 09:41:56 -04:00
qla_mbx.c qla2xxx: Fix duplicate message id. 2016-07-15 15:35:51 -04:00
qla_mid.c qla2xxx: Fix stale pointer access. 2016-02-06 19:44:30 -08:00
qla_mr.c qla2xxx: Remove use of 'struct timeval' 2016-04-15 16:53:18 -04:00
qla_mr.h
qla_nx2.c qla2xxx: Replace two macros with an inline function 2015-08-26 10:35:35 -07:00
qla_nx2.h qla2xxx: Replace two macros with an inline function 2015-08-26 10:35:35 -07:00
qla_nx.c qla2xxx: Indicate out-of-memory with -ENOMEM 2016-04-11 16:57:09 -04:00
qla_nx.h scsi/qla2xxx: Remove erroneous unused macro qla82xx_get_temp_val1() 2016-06-21 13:22:39 +02:00
qla_os.c scsi: qla2xxx: do not queue commands when unloading 2016-11-08 19:13:07 -05:00
qla_settings.h
qla_sup.c treewide: Fix typos in printk 2016-04-28 10:52:28 +02:00
qla_target.c qla2xxx: Properly initialize IO statistics. 2016-07-15 15:31:31 -04:00
qla_target.h tcm_qla2xxx: introduce a private sess_kref 2016-05-10 01:19:33 -07:00
qla_tmpl.c qla2xxx: Add ram area DDR for fwdump template entry T262. 2016-07-15 15:31:31 -04:00
qla_tmpl.h
qla_version.h qla2xxx: Update driver version to 8.07.00.38-k 2016-07-15 15:35:52 -04:00
tcm_qla2xxx.c tcm_qla2xxx Add SCSI command jammer/discard capability 2016-05-10 01:27:17 -07:00
tcm_qla2xxx.h tcm_qla2xxx Add SCSI command jammer/discard capability 2016-05-10 01:27:17 -07:00