On Wed, 17 May 2023 11:22:35 +0300, Gleb Chesnokov wrote: > 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. > > [...] Applied to 6.4/scsi-fixes. Whitespace was still mangled so I had to apply by hand. Please verify, thanks! [1/1] qla2xxx: Fix NULL pointer dereference in target mode https://git.kernel.org/mkp/scsi/c/d54820b22e40 -- Martin K. Petersen Oracle Linux Engineering