Skip to content

Commit

Permalink
[SCSI] libfcoe: Avoid hang when receiving non-critical descriptors
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bhanu Prakash Gollapudi authored and James Bottomley committed Jul 27, 2010
1 parent 281ae64 commit 1508f3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/scsi/fcoe/libfcoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 1508f3e

Please sign in to comment.