linux_dsm_epyc7002/drivers/scsi/qla2xxx
Quinn Tran 83949613fa scsi: qla2xxx: Fix null pointer access during disconnect from subsystem
NVMEAsync command is being submitted to QLA while the same NVMe controller
is in the middle of reset. The reset path has deleted the association and
freed aen_op->fcp_req.private. Add a check for this private pointer before
issuing the command.

...
 6 [ffffb656ca11fce0] page_fault at ffffffff8c00114e
    [exception RIP: qla_nvme_post_cmd+394]
    RIP: ffffffffc0d012ba  RSP: ffffb656ca11fd98  RFLAGS: 00010206
    RAX: ffff8fb039eda228  RBX: ffff8fb039eda200  RCX: 00000000000da161
    RDX: ffffffffc0d4d0f0  RSI: ffffffffc0d26c9b  RDI: ffff8fb039eda220
    RBP: 0000000000000013   R8: ffff8fb47ff6aa80   R9: 0000000000000002
    R10: 0000000000000000  R11: ffffb656ca11fdc8  R12: ffff8fb27d04a3b0
    R13: ffff8fc46dd98a58  R14: 0000000000000000  R15: ffff8fc4540f0000
    ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018
 7 [ffffb656ca11fe08] nvme_fc_start_fcp_op at ffffffffc0241568 [nvme_fc]
 8 [ffffb656ca11fe50] nvme_fc_submit_async_event at ffffffffc0241901 [nvme_fc]
 9 [ffffb656ca11fe68] nvme_async_event_work at ffffffffc014543d [nvme_core]
10 [ffffb656ca11fe98] process_one_work at ffffffff8b6cd437
11 [ffffb656ca11fed8] worker_thread at ffffffff8b6cdcef
12 [ffffb656ca11ff10] kthread at ffffffff8b6d3402
13 [ffffb656ca11ff50] ret_from_fork at ffffffff8c000255

--
PID: 37824  TASK: ffff8fb033063d80  CPU: 20  COMMAND: "kworker/u97:451"
 0 [ffffb656ce1abc28] __schedule at ffffffff8be629e3
 1 [ffffb656ce1abcc8] schedule at ffffffff8be62fe8
 2 [ffffb656ce1abcd0] schedule_timeout at ffffffff8be671ed
 3 [ffffb656ce1abd70] wait_for_completion at ffffffff8be639cf
 4 [ffffb656ce1abdd0] flush_work at ffffffff8b6ce2d5
 5 [ffffb656ce1abe70] nvme_stop_ctrl at ffffffffc0144900 [nvme_core]
 6 [ffffb656ce1abe80] nvme_fc_reset_ctrl_work at ffffffffc0243445 [nvme_fc]
 7 [ffffb656ce1abe98] process_one_work at ffffffff8b6cd437
 8 [ffffb656ce1abed8] worker_thread at ffffffff8b6cdb50
 9 [ffffb656ce1abf10] kthread at ffffffff8b6d3402
10 [ffffb656ce1abf50] ret_from_fork at ffffffff8c000255

Link: https://lore.kernel.org/r/20200806111014.28434-10-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-08-17 22:40:15 -04:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
qla_attr.c SCSI misc on 20200605 2020-06-05 15:11:50 -07:00
qla_bsg.c scsi: qla2xxx: Remove a superfluous cast 2020-06-30 23:12:20 -04:00
qla_bsg.h
qla_dbg.c scsi: qla2xxx: SAN congestion management implementation 2020-07-01 22:25:09 -04:00
qla_dbg.h scsi: qla2xxx: Allow ql2xextended_error_logging special value 1 to be set anytime 2020-08-17 22:40:13 -04:00
qla_def.h scsi: qla2xxx: Fix WARN_ON in qla_nvme_register_hba 2020-08-17 22:40:14 -04:00
qla_devtbl.h
qla_dfs.c scsi: qla2xxx: fix FW resource count values 2020-02-28 20:32:31 -05:00
qla_dsd.h
qla_fw.h scsi: qla2xxx: Address a set of sparse warnings 2020-07-15 16:12:24 -04:00
qla_gbl.h scsi: qla2xxx: SAN congestion management implementation 2020-07-01 22:25:09 -04:00
qla_gs.c scsi: qla2xxx: Fix login timeout 2020-08-17 22:40:12 -04:00
qla_init.c SCSI misc on 20200806 2020-08-06 16:50:07 -07:00
qla_inline.h scsi: Fix trivial spelling 2020-06-15 23:28:04 -04:00
qla_iocb.c scsi: qla2xxx: Make __qla2x00_alloc_iocbs() initialize 32 bits of request_t.handle 2020-06-30 23:12:22 -04:00
qla_isr.c scsi: qla2xxx: Reduce noisy debug message 2020-08-17 22:40:13 -04:00
qla_mbx.c scsi: qla2xxx: Use MBX_TOV_SECONDS for mailbox command timeout values 2020-08-17 22:19:06 -04:00
qla_mid.c scsi: qla2xxx: Cast explicitly to uint16_t / uint32_t 2020-05-19 21:43:19 -04:00
qla_mr.c scsi: qla2xxx: Fix endianness annotations in source files 2020-05-19 21:43:28 -04:00
qla_mr.h scsi: qla2xxx: Fix endianness annotations in header files 2020-05-19 21:43:24 -04:00
qla_nvme.c scsi: qla2xxx: Fix null pointer access during disconnect from subsystem 2020-08-17 22:40:15 -04:00
qla_nvme.h scsi: qla2xxx: Fix endianness annotations in header files 2020-05-19 21:43:24 -04:00
qla_nx2.c scsi: qla2xxx: Cast explicitly to uint16_t / uint32_t 2020-05-19 21:43:19 -04:00
qla_nx2.h
qla_nx.c scsi: qla2xxx: Initialize 'n' before using it 2020-06-30 23:12:20 -04:00
qla_nx.h scsi: qla2xxx: Fix endianness annotations in header files 2020-05-19 21:43:24 -04:00
qla_os.c scsi: qla2xxx: Check if FW supports MQ before enabling 2020-08-17 22:40:15 -04:00
qla_settings.h
qla_sup.c scsi: qla2xxx: Fix endianness annotations in source files 2020-05-19 21:43:28 -04:00
qla_target.c scsi: qla2xxx: Fix login timeout 2020-08-17 22:40:12 -04:00
qla_target.h scsi: qla2xxx: Remove the __packed annotation from struct fcp_hdr and fcp_hdr_le 2020-06-30 23:12:19 -04:00
qla_tmpl.c scsi: qla2xxx: Fix endianness annotations in source files 2020-05-19 21:43:28 -04:00
qla_tmpl.h scsi: qla2xxx: Fix endianness annotations in header files 2020-05-19 21:43:24 -04:00
qla_version.h scsi: qla2xxx: Update driver version to 10.01.00.25-k 2020-02-28 20:32:37 -05:00
tcm_qla2xxx.c scsi: qla2xxx: Check the size of struct fcp_hdr at compile time 2020-06-30 23:12:18 -04:00
tcm_qla2xxx.h