]> git.itanic.dy.fi Git - linux-stable/commit
scsi: lpfc: Synchronize access to remoteport via rport
authorJames Smart <jsmart2021@gmail.com>
Thu, 13 Sep 2018 22:41:10 +0000 (15:41 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Oct 2018 07:47:08 +0000 (09:47 +0200)
commitfab5471586f47fc5f57b1f6e55be8da84e7f45d3
tree3b9a63b9bae416ee2d8458aa426813621e211762
parent7dc74b2622c2aaa550fb2d0175a4fe4ce4035282
scsi: lpfc: Synchronize access to remoteport via rport

[ Upstream commit 9e210178267b80c4eeb832fade7e146a18c84915 ]

The driver currently uses the ndlp to get the local rport which is then used
to get the nvme transport remoteport pointer. There can be cases where a stale
remoteport pointer is obtained as synchronization isn't done through the
different dereferences.

Correct by using locks to synchronize the dereferences.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/lpfc/lpfc_attr.c
drivers/scsi/lpfc/lpfc_debugfs.c
drivers/scsi/lpfc/lpfc_nvme.c