net/core/skbuff: Check the return value of skb_copy_bits()
[ Upstream commit c624c58e08b15105662b9ab9be23d14a6b945a49 ] skb_copy_bits() could fail, which requires a check on the return value. Signed-off-by: Li Zhong <floridsleeves@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
@@ -3986,9 +3986,8 @@ normal:
|
|||||||
SKB_GSO_CB(nskb)->csum_start =
|
SKB_GSO_CB(nskb)->csum_start =
|
||||||
skb_headroom(nskb) + doffset;
|
skb_headroom(nskb) + doffset;
|
||||||
} else {
|
} else {
|
||||||
skb_copy_bits(head_skb, offset,
|
if (skb_copy_bits(head_skb, offset, skb_put(nskb, len), len))
|
||||||
skb_put(nskb, len),
|
goto err;
|
||||||
len);
|
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user