提交 46da547e 编写于 作者: S SeongJae Park 提交者: Martin K. Petersen

scsi: lpfc: Avoid another null dereference in lpfc_sli4_hba_unset()

Commit cdb42bec ("scsi: lpfc: Replace io_channels for nvme and fcp with
general hdw_queues per cpu") has introduced static checker warnings for
potential null dereferences in 'lpfc_sli4_hba_unset()' and commit 1ffdd2c0
("scsi: lpfc: resolve static checker warning in lpfc_sli4_hba_unset") has
tried to fix it.  However, yet another potential null dereference is
remaining.  This commit fixes it.

This bug was discovered and resolved using Coverity Static Analysis
Security Testing (SAST) by Synopsys, Inc.

Link: https://lore.kernel.org/r/20200623084122.30633-1-sjpark@amazon.com
Fixes: 1ffdd2c0 ("scsi: lpfc: resolve static checker warning inlpfc_sli4_hba_unset")
Fixes: cdb42bec ("scsi: lpfc: Replace io_channels for nvme and fcp with general hdw_queues per cpu")
Reviewed-by: NJames Smart <james.smart@broadcom.com>
Signed-off-by: NSeongJae Park <sjpark@amazon.de>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 aad4b4d1
...@@ -11878,6 +11878,7 @@ lpfc_sli4_hba_unset(struct lpfc_hba *phba) ...@@ -11878,6 +11878,7 @@ lpfc_sli4_hba_unset(struct lpfc_hba *phba)
lpfc_sli4_xri_exchange_busy_wait(phba); lpfc_sli4_xri_exchange_busy_wait(phba);
/* per-phba callback de-registration for hotplug event */ /* per-phba callback de-registration for hotplug event */
if (phba->pport)
lpfc_cpuhp_remove(phba); lpfc_cpuhp_remove(phba);
/* Disable PCI subsystem interrupt */ /* Disable PCI subsystem interrupt */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册