OpenCloudOS-Kernel/drivers/scsi/qla2xxx
Arun Easi 6a81533d61 scsi: qla2xxx: Fix kernel crash after disconnecting NVMe devices
BUG: unable to handle kernel NULL pointer dereference at           (null)
IP: [<ffffffffc050d10c>] qla_nvme_unregister_remote_port+0x6c/0xf0 [qla2xxx]
PGD 800000084cf41067 PUD 84d288067 PMD 0
Oops: 0000 [#1] SMP
Call Trace:
 [<ffffffff98abcfdf>] process_one_work+0x17f/0x440
 [<ffffffff98abdca6>] worker_thread+0x126/0x3c0
 [<ffffffff98abdb80>] ? manage_workers.isra.26+0x2a0/0x2a0
 [<ffffffff98ac4f81>] kthread+0xd1/0xe0
 [<ffffffff98ac4eb0>] ? insert_kthread_work+0x40/0x40
 [<ffffffff9918ad37>] ret_from_fork_nospec_begin+0x21/0x21
 [<ffffffff98ac4eb0>] ? insert_kthread_work+0x40/0x40
RIP  [<ffffffffc050d10c>] qla_nvme_unregister_remote_port+0x6c/0xf0 [qla2xxx]

The crash is due to a bad entry in the nvme_rport_list. This list is not
protected, and when a remoteport_delete callback is called, driver
traverses the list and crashes.

Actually, the list could be removed and driver could traverse the main
fcport list instead. Fix does exactly that.

Signed-off-by: Arun Easi <aeasi@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-06-27 00:09:18 -04: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: Insert spaces where required 2019-04-15 22:04:40 -04:00
qla_bsg.c scsi: qla2xxx: Introduce the dsd32 and dsd64 data structures 2019-04-29 17:24:51 -04:00
qla_bsg.h scsi: qla2xxx: Add 28xx flash primary/secondary status/image mechanism 2019-03-19 12:22:55 -04:00
qla_dbg.c scsi: qla2xxx: Insert spaces where required 2019-04-15 22:04:40 -04:00
qla_dbg.h scsi: qla2xxx: Cleanups for NVRAM/Flash read/write path 2019-03-19 12:22:54 -04:00
qla_def.h scsi: qla2xxx: Fix kernel crash after disconnecting NVMe devices 2019-06-27 00:09:18 -04: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: Leave a blank line after declarations 2019-04-15 22:04:39 -04:00
qla_dsd.h scsi: qla2xxx: Introduce the dsd32 and dsd64 data structures 2019-04-29 17:24:51 -04:00
qla_fw.h scsi: qla2xxx: Use __le64 instead of uint32_t[2] for sending DMA addresses to firmware 2019-04-29 17:24:51 -04:00
qla_gbl.h scsi: qla2xxx: Introduce the dsd32 and dsd64 data structures 2019-04-29 17:24:51 -04:00
qla_gs.c scsi: qla2xxx: Use __le64 instead of uint32_t[2] for sending DMA addresses to firmware 2019-04-29 17:24:51 -04:00
qla_init.c scsi: qla2xxx: remove double assignment in qla2x00_update_fcport 2019-06-18 19:46:24 -04:00
qla_inline.h scsi: qla2xxx: Uninline qla2x00_init_timer() 2019-04-29 17:24:49 -04:00
qla_iocb.c scsi: qla2xxx: Use __le64 instead of uint32_t[2] for sending DMA addresses to firmware 2019-04-29 17:24:51 -04:00
qla_isr.c scsi: qla2xxx: Fix a qla24xx_enable_msix() error path 2019-04-29 17:24:50 -04:00
qla_mbx.c scsi: qla2xxx: Log the status code if a firmware command fails 2019-04-29 17:24:49 -04:00
qla_mid.c scsi: qla2xxx: Use an on-stack completion in qla24xx_control_vp() 2019-04-29 17:24:51 -04:00
qla_mr.c scsi: qla2xxx: Use __le64 instead of uint32_t[2] for sending DMA addresses to firmware 2019-04-29 17:24:51 -04:00
qla_mr.h scsi: qla2xxx: Introduce the dsd32 and dsd64 data structures 2019-04-29 17:24:51 -04:00
qla_nvme.c scsi: qla2xxx: Fix kernel crash after disconnecting NVMe devices 2019-06-27 00:09:18 -04:00
qla_nvme.h scsi: qla2xxx: Fix kernel crash after disconnecting NVMe devices 2019-06-27 00:09:18 -04:00
qla_nx.c scsi: qla2xxx: Use __le64 instead of uint32_t[2] for sending DMA addresses to firmware 2019-04-29 17:24:51 -04:00
qla_nx.h scsi: qla2xxx: Move the <linux/io-64-nonatomic-lo-hi.h> include directive 2019-04-15 22:04:40 -04:00
qla_nx2.c scsi: qla2xxx: Increase the size of the mailbox arrays from 4 to 8 2019-04-29 17:24:49 -04:00
qla_nx2.h scsi: qla2xxx: Remove unused symbols 2018-02-12 11:43:24 -05:00
qla_os.c scsi: qla2xxx: Fix kernel crash after disconnecting NVMe devices 2019-06-27 00:09:18 -04:00
qla_settings.h
qla_sup.c scsi: qla2xxx: Insert spaces where required 2019-04-15 22:04:40 -04:00
qla_target.c scsi: qla2xxx: Avoid that qlt_send_resp_ctio() corrupts memory 2019-04-29 17:24:51 -04:00
qla_target.h scsi: qla2xxx: Use __le64 instead of uint32_t[2] for sending DMA addresses to firmware 2019-04-29 17:24:51 -04:00
qla_tmpl.c scsi: qla2xxx: Simplification of register address used in qla_tmpl.c 2019-03-19 12:22:55 -04:00
qla_tmpl.h scsi: qla2xxx: Correction and improvement to fwdt processing 2019-03-19 12:22:55 -04:00
qla_version.h scsi: qla2xxx: Update driver version to 10.01.00.16-k 2019-04-03 23:45:59 -04:00
tcm_qla2xxx.c scsi: qla2xxx: Avoid that lockdep complains about unsafe locking in tcm_qla2xxx_close_session() 2019-04-29 17:24:52 -04:00
tcm_qla2xxx.h scsi: qla2xxx: deadlock by configfs_depend_item 2018-12-19 21:26:38 -05:00