linux-stable/drivers/scsi/qla2xxx
Gleb Chesnokov d54820b22e scsi: qla2xxx: Fix NULL pointer dereference in target mode
When target mode is enabled, the pci_irq_get_affinity() function may return
a NULL value in qla_mapq_init_qp_cpu_map() due to the qla24xx_enable_msix()
code that handles IRQ settings for target mode. This leads to a crash due
to a NULL pointer dereference.

This patch fixes the issue by adding a check for the NULL value returned by
pci_irq_get_affinity() and introducing a 'cpu_mapped' boolean flag to the
qla_qpair structure, ensuring that the qpair's CPU affinity is updated when
it has not been mapped to a CPU.

Fixes: 1d201c81d4 ("scsi: qla2xxx: Select qpair depending on which CPU post_cmd() gets called")
Signed-off-by: Gleb Chesnokov <gleb.chesnokov@scst.dev>
Link: https://lore.kernel.org/r/56b416f2-4e0f-b6cf-d6d5-b7c372e3c6a2@scst.dev
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2023-05-22 18:00:16 -04:00
..
Kconfig
Makefile
qla_attr.c scsi: qla2xxx: Remove dead code 2023-01-11 23:48:25 -05:00
qla_bsg.c scsi: qla2xxx: Check if port is online before sending ELS 2023-01-11 21:28:37 -05:00
qla_bsg.h scsi: qla2xxx: Add NVMe parameters support in Auxiliary Image Status 2022-09-01 00:30:55 -04:00
qla_dbg.c scsi: qla2xxx: Enhance driver tracing with separate tunable and more 2022-09-01 00:30:55 -04:00
qla_dbg.h scsi: qla2xxx: Enhance driver tracing with separate tunable and more 2022-09-01 00:30:55 -04:00
qla_def.h scsi: qla2xxx: Fix NULL pointer dereference in target mode 2023-05-22 18:00:16 -04:00
qla_devtbl.h
qla_dfs.c scsi: qla2xxx: Fix exchange oversubscription for management commands 2023-01-11 21:28:37 -05:00
qla_dsd.h
qla_edif.c scsi: qla2xxx: edif: Fix clang warning 2023-01-11 23:48:26 -05:00
qla_edif.h scsi: qla2xxx: Relocate/rename vp map 2023-01-11 23:48:25 -05:00
qla_edif_bsg.h scsi: qla2xxx: edif: Fix clang warning 2023-01-11 23:48:26 -05:00
qla_fw.h scsi: qla2xxx: Add NVMe parameters support in Auxiliary Image Status 2022-09-01 00:30:55 -04:00
qla_gbl.h Merge branch '6.3/scsi-fixes' into 6.4/scsi-staging 2023-03-31 21:45:14 -04:00
qla_gs.c scsi: qla2xxx: Remove dead code (GNN ID) 2023-01-11 23:48:25 -05:00
qla_init.c scsi: qla2xxx: Fix NULL pointer dereference in target mode 2023-05-22 18:00:16 -04:00
qla_inline.h scsi: qla2xxx: Fix NULL pointer dereference in target mode 2023-05-22 18:00:16 -04:00
qla_iocb.c scsi: qla2xxx: edif: Fix performance dip due to lock contention 2023-01-11 23:48:25 -05:00
qla_isr.c scsi: qla2xxx: Fix NULL pointer dereference in target mode 2023-05-22 18:00:16 -04:00
qla_mbx.c scsi: qla2xxx: Relocate/rename vp map 2023-01-11 23:48:25 -05:00
qla_mid.c scsi: qla2xxx: Declare SCSI host template const 2023-03-24 19:19:59 -04:00
qla_mr.c
qla_mr.h
qla_nvme.c scsi: qla2xxx: Select qpair depending on which CPU post_cmd() gets called 2023-01-11 23:48:26 -05:00
qla_nvme.h scsi: qla2xxx: Increase max limit of ql2xnvme_queues 2022-03-15 00:29:15 -04:00
qla_nx.c scsi: qla2xxx: Use named initializers for q_dev_state 2022-02-22 21:11:07 -05:00
qla_nx.h scsi: qla2xxx: Use named initializers for q_dev_state 2022-02-22 21:11:07 -05:00
qla_nx2.c scsi: qla2xxx: Use named initializers for q_dev_state 2022-02-22 21:11:07 -05:00
qla_nx2.h
qla_os.c SCSI misc on 20230426 2023-04-26 15:39:25 -07:00
qla_settings.h
qla_sup.c
qla_target.c scsi: qla2xxx: Refer directly to the qla2xxx_driver_template 2023-03-24 19:19:19 -04:00
qla_target.h scsi: qla2xxx: Relocate/rename vp map 2023-01-11 23:48:25 -05:00
qla_tmpl.c
qla_tmpl.h
qla_version.h scsi: qla2xxx: Update version to 10.02.08.200-k 2023-01-11 23:48:26 -05:00
tcm_qla2xxx.c scsi: qla2xxx: Remove default fabric ops callouts 2023-03-16 23:36:36 -04:00
tcm_qla2xxx.h