linux/drivers/scsi/qla2xxx
Bill Kuzeja 6a2cf8d366 scsi: qla2xxx: Fix crashes in qla2x00_probe_one on probe failure
Because of the shifting around of code in qla2x00_probe_one recently,
failures during adapter initialization can lead to problems, i.e. NULL
pointer crashes and doubly freed data structures which cause eventual
panics.

This V2 version makes the relevant memory free routines idempotent, so
repeat calls won't cause any harm. I also removed the problematic
probe_init_failed exit point as it is not needed.

Fixes: d64d6c5671 ("scsi: qla2xxx: Fix NULL pointer crash due to probe failure")
Signed-off-by: Bill Kuzeja <william.kuzeja@stratus.com>
Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-03-06 22:07:49 -05:00
..
Kconfig scsi: qla2xxx: avoid unused-function warning 2017-07-01 17:14:58 -04:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
qla_attr.c scsi: qla2xxx: Use zeroing allocator rather than allocator/memset 2018-01-04 01:09:26 -05:00
qla_bsg.c scsi: qla2xxx: Use zeroing allocator rather than allocator/memset 2018-01-04 01:09:26 -05:00
qla_bsg.h
qla_dbg.c scsi: qla2xxx: Remove potential macro parameter side-effect in ql_dump_regs() 2017-08-24 22:29:28 -04:00
qla_dbg.h scsi: qla2xxx: Include Exchange offload/Extended Login into FW dump 2017-06-27 21:21:41 -04:00
qla_def.h scsi: qla2xxx: Fix FC-NVMe LUN discovery 2018-03-01 20:16:53 -05:00
qla_devtbl.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
qla_dfs.c scsi: qla2xxx: Add XCB counters to debugfs 2018-01-22 20:03:54 -05:00
qla_fw.h scsi: qla2xxx: Fix session cleanup for N2N 2018-01-03 23:41:06 -05:00
qla_gbl.h scsi: qla2xxx: Serialize session deletion by using work_lock 2018-01-03 23:41:08 -05:00
qla_gs.c scsi: qla2xxx: Fix FC-NVMe LUN discovery 2018-03-01 20:16:53 -05:00
qla_init.c scsi: qla2xxx: Fix FC-NVMe LUN discovery 2018-03-01 20:16:53 -05:00
qla_inline.h scsi: qla2xxx: Use IOCB path to submit Control VP MBX command 2018-01-03 23:41:04 -05:00
qla_iocb.c scsi: qla2xxx: Fix incorrect handle for abort IOCB 2018-02-13 21:35:39 -05:00
qla_isr.c scsi: qla2xxx: Avoid triggering undefined behavior in qla2x00_mbx_completion() 2018-01-30 21:33:10 -05:00
qla_mbx.c scsi: qla2xxx: Serialize session deletion by using work_lock 2018-01-03 23:41:08 -05:00
qla_mid.c scsi: qla2xxx: Reduce trace noise for Async Events 2018-01-03 23:41:06 -05:00
qla_mr.c scsi: qla2xxx: don't break the bsg-lib abstractions 2017-10-16 23:46:21 -04:00
qla_mr.h
qla_nvme.c qla2xxx: remove use of FC-specific error codes 2017-09-25 08:56:05 -06:00
qla_nvme.h scsi: qla2xxx: Move function prototype to correct header 2017-08-07 14:04:02 -04:00
qla_nx2.c scsi: qla2xxx: remove duplicate includes 2017-12-11 21:52:38 -05:00
qla_nx2.h
qla_nx.c scsi: qla2xxx: fix a bunch of typos and spelling mistakes 2017-07-01 17:12:31 -04:00
qla_nx.h scsi: qla2xxx: remove writeq/readq function definitions 2017-06-12 20:48:08 -04:00
qla_os.c scsi: qla2xxx: Fix crashes in qla2x00_probe_one on probe failure 2018-03-06 22:07:49 -05:00
qla_settings.h
qla_sup.c scsi: qla2xxx: Suppress gcc 7 fall-through warnings 2017-12-11 21:50:29 -05:00
qla_target.c scsi: qla2xxx: Fixup locking for session deletion 2018-03-01 20:16:50 -05:00
qla_target.h scsi: qla2xxx: Migrate switch registration commands away from mailbox interface 2018-01-03 23:41:07 -05:00
qla_tmpl.c scsi: qla2xxx: Fix Firmware dump size for Extended login and Exchange Offload 2018-01-03 23:41:05 -05:00
qla_tmpl.h
qla_version.h scsi: qla2xxx: Update driver version to 10.00.00.05-k 2018-01-22 20:03:55 -05:00
tcm_qla2xxx.c scsi: qla2xxx: Use zeroing allocator rather than allocator/memset 2018-01-04 01:09:26 -05:00
tcm_qla2xxx.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00