From: Chad Dupuis Date: Tue, 26 Mar 2019 07:38:41 +0000 (-0700) Subject: scsi: qedf: Add missing fc_disc_init call after allocating lport X-Git-Tag: v5.2-rc1~130^2~179 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=0cbd0075390db67324cfd33a50fa4998b605a085;p=linux.git 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 Signed-off-by: Saurav Kashyap Signed-off-by: Martin K. Petersen --- 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;