From: Chad Dupuis <cdup...@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 <cdup...@marvell.com>
Signed-off-by: Saurav Kashyap <skash...@marvell.com>
---
 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 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;
-- 
1.8.3.1

Reply via email to