diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-08-15 02:01:59 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-08-15 02:01:59 +0300 |
commit | c9c9735c46f589b9877b7fc00c89ef1b61a31e18 (patch) | |
tree | cef92dbb6db8a55caddeb942a60b55bfb0a2e493 /drivers/scsi/libfc | |
parent | fded09198826b2998242ed2e1a16527849884d3f (diff) | |
parent | 7e0e8be3a1fd1399373224e22d77487e63566704 (diff) | |
download | linux-c9c9735c46f589b9877b7fc00c89ef1b61a31e18.tar.xz |
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull more SCSI updates from James Bottomley:
"This is the set of patches which arrived too late to stabilise in
-next for the first pull.
It's really just an lpfc driver update and an assortment of minor
fixes, all in drivers. The only core update is to the zone block
device driver, which isn't the one most people use"
* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: lpfc: Update lpfc version to 12.8.0.3
scsi: lpfc: Fix LUN loss after cable pull
scsi: lpfc: Fix validation of bsg reply lengths
scsi: lpfc: Fix retry of PRLI when status indicates its unsupported
scsi: lpfc: Fix oops when unloading driver while running mds diags
scsi: lpfc: Fix RSCN timeout due to incorrect gidft counter
scsi: lpfc: Fix no message shown for lpfc_hdw_queue out of range value
scsi: lpfc: Fix FCoE speed reporting
scsi: lpfc: Add missing misc_deregister() for lpfc_init()
scsi: lpfc: nvmet: Avoid hang / use-after-free again when destroying targetport
scsi: scsi_transport_sas: Add spaces around binary operator "|"
scsi: sd_zbc: Improve zone revalidation
scsi: libfc: Free skb in fc_disc_gpn_id_resp() for valid cases
scsi: fcoe: Memory leak fix in fcoe_sysfs_fcf_del()
scsi: target: Make iscsit_register_transport() return void
Diffstat (limited to 'drivers/scsi/libfc')
-rw-r--r-- | drivers/scsi/libfc/fc_disc.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c index 19721db23283..d8cbc9c0e766 100644 --- a/drivers/scsi/libfc/fc_disc.c +++ b/drivers/scsi/libfc/fc_disc.c @@ -581,8 +581,12 @@ static void fc_disc_gpn_id_resp(struct fc_seq *sp, struct fc_frame *fp, if (PTR_ERR(fp) == -FC_EX_CLOSED) goto out; - if (IS_ERR(fp)) - goto redisc; + if (IS_ERR(fp)) { + mutex_lock(&disc->disc_mutex); + fc_disc_restart(disc); + mutex_unlock(&disc->disc_mutex); + goto out; + } cp = fc_frame_payload_get(fp, sizeof(*cp)); if (!cp) @@ -609,7 +613,7 @@ static void fc_disc_gpn_id_resp(struct fc_seq *sp, struct fc_frame *fp, new_rdata->disc_id = disc->disc_id; fc_rport_login(new_rdata); } - goto out; + goto free_fp; } rdata->disc_id = disc->disc_id; mutex_unlock(&rdata->rp_mutex); @@ -626,6 +630,8 @@ redisc: fc_disc_restart(disc); mutex_unlock(&disc->disc_mutex); } +free_fp: + fc_frame_free(fp); out: kref_put(&rdata->kref, fc_rport_destroy); if (!IS_ERR(fp)) |