diff options
author | James Smart <jsmart2021@gmail.com> | 2017-06-01 21:07:06 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-06-12 21:37:31 -0400 |
commit | e92974f6cdaad36691b74045817b585a7b76988b (patch) | |
tree | 117b7e9c4297dbef3a8a9aa6673fd916d0d85b6b /drivers/scsi/lpfc | |
parent | b83d005e63ba2383738c1818691e973761d1e860 (diff) | |
download | linux-e92974f6cdaad36691b74045817b585a7b76988b.tar.gz linux-e92974f6cdaad36691b74045817b585a7b76988b.tar.bz2 linux-e92974f6cdaad36691b74045817b585a7b76988b.zip |
scsi: lpfc: Null pointer dereference when log_verbose is set to 0xffffffff
Kernel panic when log_verbose is set to 0xffffffff
phba->pport is dereferenced before it is initialized
Fix: Do not dereference phba->pport if it is NULL
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index c4ceef69bd6b..fb4c708ae747 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -7513,7 +7513,8 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, "(%d):0308 Mbox cmd issue - BUSY Data: " "x%x x%x x%x x%x\n", pmbox->vport ? pmbox->vport->vpi : 0xffffff, - mbx->mbxCommand, phba->pport->port_state, + mbx->mbxCommand, + phba->pport ? phba->pport->port_state : 0xff, psli->sli_flag, flag); psli->slistat.mbox_busy++; @@ -7565,7 +7566,8 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, "(%d):0309 Mailbox cmd x%x issue Data: x%x x%x " "x%x\n", pmbox->vport ? pmbox->vport->vpi : 0, - mbx->mbxCommand, phba->pport->port_state, + mbx->mbxCommand, + phba->pport ? phba->pport->port_state : 0xff, psli->sli_flag, flag); if (mbx->mbxCommand != MBX_HEARTBEAT) { |