diff options
author | James Smart <james.smart@avagotech.com> | 2015-05-21 19:55:26 +0200 |
---|---|---|
committer | James Bottomley <JBottomley@Odin.com> | 2015-06-06 07:39:07 +0200 |
commit | cc82355a6e6cb606125b849db7f9e9a10408d407 (patch) | |
tree | ab779d539c26b49ae7851542ec29adafdd31701d /drivers/scsi/lpfc/lpfc_init.c | |
parent | lpfc: Fix to remove IRQF_SHARED flag for MSI/MSI-X vectors. (diff) | |
download | linux-cc82355a6e6cb606125b849db7f9e9a10408d407.tar.xz linux-cc82355a6e6cb606125b849db7f9e9a10408d407.zip |
lpfc: Fix crash in vport_delete.
We inadvertantly took the path to recreate the vport while in a
driver teardown path
Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_init.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 6ab831243d43..14424e66b561 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -4483,7 +4483,13 @@ lpfc_sli4_async_fip_evt(struct lpfc_hba *phba, lpfc_destroy_vport_work_array(phba, vports); } - if (active_vlink_present) { + /* + * Don't re-instantiate if vport is marked for deletion. + * If we are here first then vport_delete is going to wait + * for discovery to complete. + */ + if (!(vport->load_flag & FC_UNLOADING) && + active_vlink_present) { /* * If there are other active VLinks present, * re-instantiate the Vlink using FDISC. |