From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Gleb Chesnokov <gleb.chesnokov@scst.dev>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH] qla2xxx: Fix NULL pointer dereference in target mode
Date: Tue, 16 May 2023 21:21:37 -0400 [thread overview]
Message-ID: <yq1h6sbvjne.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <32b0bb9f-ba6a-e9f1-e779-5af2e115c67a@scst.dev> (Gleb Chesnokov's message of "Thu, 11 May 2023 13:02:41 +0300")
Hi Gleb!
> 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.
Your patch is whitespace-mangled. Please fix and resubmit.
--
Martin K. Petersen Oracle Linux Engineering
next prev parent reply other threads:[~2023-05-17 1:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-11 10:02 [PATCH] qla2xxx: Fix NULL pointer dereference in target mode Gleb Chesnokov
2023-05-12 16:29 ` Himanshu Madhani
2023-05-17 1:21 ` Martin K. Petersen [this message]
2023-05-17 8:22 ` Gleb Chesnokov
2023-05-22 22:45 ` Martin K. Petersen
2023-05-23 8:51 ` Gleb Chesnokov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yq1h6sbvjne.fsf@ca-mkp.ca.oracle.com \
--to=martin.petersen@oracle.com \
--cc=gleb.chesnokov@scst.dev \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox