mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-20 01:20:54 +00:00
net/core/skbuff: Check the return value of skb_copy_bits()
[ Upstream commit c624c58e08
]
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:
parent
bd1b769564
commit
0b7058067e
1 changed files with 2 additions and 3 deletions
|
@ -4188,9 +4188,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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue