]> www.infradead.org Git - users/jedix/linux-maple.git/commit
lpfc: Fix crash when unregistering default rpi.
authorJames Smart <james.smart@broadcom.com>
Thu, 31 Mar 2016 21:12:29 +0000 (14:12 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 13 Jul 2016 07:45:08 +0000 (00:45 -0700)
commit4fa03ac5e9f3f85cf78ef36165a2c9dbc654de16
treeb2acb03ec75b4ee21de7d5b6bf4550bd6f81c8e4
parent7419655d272ed42c2d248bfc81c3cde8d2072164
lpfc: Fix crash when unregistering default rpi.

The default rpi completion handler does back to back puts to force the
removal of the ndlp. This ends up calling lpfc_unreg_rpi after the
reference count is at 0.

Fix:  Check the reference count of the ndlp before getting the ref to
make sure we are not getting a reference on a removed object.

Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Orabug: 23762058
(cherry picked from commit a6517db9006eb618dfde54f4bf6a9a8bc21e16e7)
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
drivers/scsi/lpfc/lpfc_hbadisc.c