]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
scsi: qedf: Add missing fc_disc_init call after allocating lport
authorChad Dupuis <cdupuis@marvell.com>
Tue, 26 Mar 2019 07:38:41 +0000 (00:38 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 28 Mar 2019 01:54:52 +0000 (21:54 -0400)
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>
drivers/scsi/qedf/qedf_main.c

index 5bef6641dea0477732840ebe2c5cff0b094b333b..e5d644f6e09895af2964ad33982f77c21952a604 100644 (file)
@@ -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;