Commit c624c58e authored by lily's avatar lily Committed by David S. Miller
Browse files

net/core/skbuff: Check the return value of skb_copy_bits()



skb_copy_bits() could fail, which requires a check on the return
value.

Signed-off-by: default avatarLi Zhong <floridsleeves@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 76de0083
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -4205,9 +4205,8 @@ struct sk_buff *skb_segment(struct sk_buff *head_skb,
				SKB_GSO_CB(nskb)->csum_start =
					skb_headroom(nskb) + doffset;
			} else {
				skb_copy_bits(head_skb, offset,
					      skb_put(nskb, len),
					      len);
				if (skb_copy_bits(head_skb, offset, skb_put(nskb, len), len))
					goto err;
			}
			continue;
		}