]> git.baikalelectronics.ru Git - kernel.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)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 11 Apr 2016 20:57:09 +0000 (16:57 -0400)
commitf026b2819c6e3d43d131af310f51a3622ac2610b
treed50ed2d0cc6d34b76f012d9187125d6f80e5d439
parent8041138ad8adf3152bf9e4b183def48bc18ddd2e
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>
drivers/scsi/lpfc/lpfc_hbadisc.c