diff mbox series

[09/26] qedf: Add missing fc_disc_init call after allocating lport.

Message ID 20190305105901.13185-10-skashyap@marvell.com (mailing list archive)
State Superseded
Headers show
Series qedf: Misc fixes for the driver. | expand

Commit Message

Saurav Kashyap March 5, 2019, 10:58 a.m. UTC
From: Chad Dupuis <cdupuis@marvell.com>

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>
---
 drivers/scsi/qedf/qedf_main.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
index 3fd8107..dee6fef 100644
--- a/drivers/scsi/qedf/qedf_main.c
+++ b/drivers/scsi/qedf/qedf_main.c
@@ -3042,6 +3042,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;