mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 07:40:54 +07:00
[SCSI] libfcoe: Avoid hang when receiving non-critical descriptors
Avoid infinite loop while processing FIP ELS or discovery advertisement with non-critical descriptors. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Acked-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
parent
281ae642a6
commit
1508f3ecd9
@ -703,7 +703,7 @@ static int fcoe_ctlr_parse_adv(struct fcoe_ctlr *fip,
|
||||
/* standard says ignore unknown descriptors >= 128 */
|
||||
if (desc->fip_dtype < FIP_DT_VENDOR_BASE)
|
||||
return -EINVAL;
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
desc = (struct fip_desc *)((char *)desc + dlen);
|
||||
rlen -= dlen;
|
||||
@ -885,7 +885,7 @@ static void fcoe_ctlr_recv_els(struct fcoe_ctlr *fip, struct sk_buff *skb)
|
||||
/* standard says ignore unknown descriptors >= 128 */
|
||||
if (desc->fip_dtype < FIP_DT_VENDOR_BASE)
|
||||
goto drop;
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
desc = (struct fip_desc *)((char *)desc + dlen);
|
||||
rlen -= dlen;
|
||||
|
Loading…
Reference in New Issue
Block a user