Commit aec27311 authored by David S. Miller's avatar David S. Miller

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: default avatarPenttilä Mika <mika.penttila@ixonos.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dc7f9f6e
......@@ -476,7 +476,7 @@ static struct sk_buff *fanout_check_defrag(struct sk_buff *skb)
return skb;
if (ip_is_fragment(ip_hdr(skb))) {
skb = skb_clone(skb, GFP_ATOMIC);
skb = skb_share_check(skb, GFP_ATOMIC);
if (skb) {
if (pskb_trim_rcsum(skb, len))
return skb;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment