]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[SCSI] libfcoe: Avoid hang when receiving non-critical descriptors
authorBhanu Prakash Gollapudi <bprakash@broadcom.com>
Fri, 11 Jun 2010 23:43:38 +0000 (16:43 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Tue, 27 Jul 2010 17:01:43 +0000 (12:01 -0500)
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>
drivers/scsi/fcoe/libfcoe.c

index cc5e8864b8050fbc63bec8ebb0265b9fbc3f6c5a..66120f135d990ab293239bc6be0216b3e5c0cf9f 100644 (file)
@@ -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;