提交 1508f3ec 编写于 作者: B Bhanu Prakash Gollapudi 提交者: James Bottomley

[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: NBhanu Prakash Gollapudi <bprakash@broadcom.com>
Acked-by: NJoe Eykholt <jeykholt@cisco.com>
Signed-off-by: NRobert Love <robert.w.love@intel.com>
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
上级 281ae642
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册