-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash at qla_mapq_init_qp_cpu_map() #156
Comments
Hi, Thank you for the report! I'll try to find time to take a look at the problem next week. Thanks, |
lnocturno
added a commit
that referenced
this issue
May 11, 2023
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: a1ff8c3 ("qla2x00t-32gbit: Select qpair depending on which CPU post_cmd() gets called") Fixes: #156
Hi, I have created a patch that is slightly different from yours.. https://github.com/SCST-project/scst/tree/qla2x00t-32gbit Thanks, |
Hi, I have no equipment to retest it. |
lnocturno
added a commit
that referenced
this issue
Jun 5, 2023
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 <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> [ commit d54820b22e40 upstream ] Fixes: #156
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
This commit:
pci_irq_get_affinity() gets NULL value in qla_mapq_init_qp_cpu_map() if it turns on target mode:
In qla24xx_enable_msix():
This patch try to handle it:
The text was updated successfully, but these errors were encountered: