scsi: qedf: Add missing fc_disc_init call after allocating lport

This change “scsi: qedf: Add missing fc_disc_init call after allocating lport” (commit 0cbd007) in Linux kernel is authored by Chad Dupuis <cdupuis [at] marvell.com> on Tue Mar 26 00:38:41 2019 -0700.

Description of "scsi: qedf: Add missing fc_disc_init call after allocating lport"

The change “scsi: qedf: Add missing fc_disc_init call after allocating lport” introduces changes as follows.

scsi: qedf: Add missing fc_disc_init call after allocating lport

When receiving an unsolicited frame we could crash on a list traversal in
fc_rport_lookup while searching the rport which is associated with our
lport.

Initialize the lport's discovery node after allocating the lport in
__qedf_probe().

Signed-off-by: Chad Dupuis <cdupuis@marvell.com>
Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

Linux kernel releases containing commit 0cbd007

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "scsi: qedf: Add missing fc_disc_init call after allocating lport"

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/scsi/qedf/qedf_main.c | 2 ++
 1 file changed, 2 insertions(+)
 
diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
index 5bef6641dea0..e5d644f6e098 100644
--- a/drivers/scsi/qedf/qedf_main.c
+++ b/drivers/scsi/qedf/qedf_main.c
@@ -3047,6 +3047,8 @@ static int __qedf_probe(struct pci_dev *pdev, int mode)
 			goto err0;
 		}
 
+		fc_disc_init(lport);
+
 		/* Initialize qedf_ctx */
 		qedf = lport_priv(lport);
 		qedf->lport = lport;

The commit for this change in Linux stable tree is 0cbd007 (patch).

Last modified: 2020/02/09