mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-07 11:28:32 +00:00
packet: Fix leak in pre-defrag support.
When we clone the SKB, we forget about the original one. Avoid this problem by using skb_share_check(). Reported-by: Penttilä Mika <mika.penttila@ixonos.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
dc7f9f6e88
commit
aec27311c2
1 changed files with 1 additions and 1 deletions
|
@ -476,7 +476,7 @@ static struct sk_buff *fanout_check_defrag(struct sk_buff *skb)
|
||||||
return skb;
|
return skb;
|
||||||
|
|
||||||
if (ip_is_fragment(ip_hdr(skb))) {
|
if (ip_is_fragment(ip_hdr(skb))) {
|
||||||
skb = skb_clone(skb, GFP_ATOMIC);
|
skb = skb_share_check(skb, GFP_ATOMIC);
|
||||||
if (skb) {
|
if (skb) {
|
||||||
if (pskb_trim_rcsum(skb, len))
|
if (pskb_trim_rcsum(skb, len))
|
||||||
return skb;
|
return skb;
|
||||||
|
|
Loading…
Reference in a new issue