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>
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 41f0489..aec50a1 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -476,7 +476,7 @@
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;