]> git.baikalelectronics.ru Git - kernel.git/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)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 21 Sep 2018 02:02:36 +0000 (22:02 -0400)
commit523338d3867e6aa21a1b7e7e1c297dbb3ac8bdbd
treed3dce6607197b83d4d41ac6a2285ce8cbb8c10a4
parent5781b13cdb208c9f1a3e5c6ad3cccab5a1103581
scsi: lpfc: Synchronize access to remoteport via rport

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>
drivers/scsi/lpfc/lpfc_attr.c
drivers/scsi/lpfc/lpfc_debugfs.c
drivers/scsi/lpfc/lpfc_nvme.c