aboutsummaryrefslogtreecommitdiff
path: root/lib/crypto/utils.c
diff options
context:
space:
mode:
authorGleb Chesnokov <[email protected]>2023-05-17 11:22:35 +0300
committerMartin K. Petersen <[email protected]>2023-05-22 18:00:16 -0400
commitd54820b22e404b06b2b65877ff802cc7b31688bc (patch)
tree92dc913e4aaba259689527348b0fb5679c7b2efa /lib/crypto/utils.c
parent2a737d3b8c792400118d6cf94958f559de9c5e59 (diff)
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: 1d201c81d4cc ("scsi: qla2xxx: Select qpair depending on which CPU post_cmd() gets called") Signed-off-by: Gleb Chesnokov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'lib/crypto/utils.c')
0 files changed, 0 insertions, 0 deletions