]> www.infradead.org Git - users/jedix/linux-maple.git/commit
lpfc: Fix crash after issuing lip reset
authorJames Smart <james.smart@broadcom.com>
Wed, 12 Jul 2017 22:36:45 +0000 (18:36 -0400)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 14 Jul 2017 00:12:44 +0000 (17:12 -0700)
commit6e43523fed206d5344bc31a58acb7e57bbbdfafc
tree37fb942ca4b108f42c0ff62a484201f097628833
parent0e1f6d30a28543cd4a2508c7c7c3dff7cdee6043
lpfc: Fix crash after issuing lip reset

[backport of 43f40add69672723389a32adab1d24715aaedff0]
From: rkennedy <dick.kennedy@avagotech.com>

Orabug: 26439257

When RPI is not available, driver sends WQE with invalid RPI value and
rejected by HBA.
lpfc 0000:82:00.3: 1:3154 BLS ABORT RSP failed, data:  x3/xa0320008
and
lpfc :2753 PLOGI failure DID:FFFFFA Status:x3/xa0240008

In this case, driver accesses rpi_ids array out of bounds.

Fix:
Check return value of lpfc_sli4_alloc_rpi(). Do not allocate
lpfc_nodelist entry if RPI is not available.

When RPI is not available, we will get discovery timeouts and
command drops for some of the vports as seen below.

lpfc :0273 Unexpected discovery timeout, vport State x0
lpfc :0230 Unexpected timeout, hba link state x5
lpfc :0111 Dropping received ELS cmd Data: x0 xc90c55 x0

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/scsi/lpfc/lpfc_bsg.c
drivers/scsi/lpfc/lpfc_crtn.h
drivers/scsi/lpfc/lpfc_els.c
drivers/scsi/lpfc/lpfc_hbadisc.c
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_sli.c
drivers/scsi/lpfc/lpfc_vport.c