aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorPravin B Shelar <pshelar@nicira.com>2013-02-14 04:44:49 -0500
committerDavid S. Miller <davem@davemloft.net>2013-02-15 15:10:37 -0500
commit14bbd6a565e1bcdc240d44687edb93f721cfdf99 (patch)
treeb2001bb985856d2177212451273d1f6ebcc55035 /net/ipv6
parentd887199dc28c46788b155b234274d5ff41afed8e (diff)
net: Add skb_unclone() helper function.
This function will be used in next GRE_GSO patch. This patch does not change any functionality. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Eric Dumazet <edumazet@google.com>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/ah6.c3
-rw-r--r--net/ipv6/netfilter/nf_conntrack_reasm.c2
-rw-r--r--net/ipv6/reassembly.c2
-rw-r--r--net/ipv6/xfrm6_mode_tunnel.c3
4 files changed, 4 insertions, 6 deletions
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c
index 384233188ac1..bb02e176cb70 100644
--- a/net/ipv6/ah6.c
+++ b/net/ipv6/ah6.c
@@ -521,8 +521,7 @@ static int ah6_input(struct xfrm_state *x, struct sk_buff *skb)
521 521
522 /* We are going to _remove_ AH header to keep sockets happy, 522 /* We are going to _remove_ AH header to keep sockets happy,
523 * so... Later this can change. */ 523 * so... Later this can change. */
524 if (skb_cloned(skb) && 524 if (skb_unclone(skb, GFP_ATOMIC))
525 pskb_expand_head(skb, 0, 0, GFP_ATOMIC))
526 goto out; 525 goto out;
527 526
528 skb->ip_summed = CHECKSUM_NONE; 527 skb->ip_summed = CHECKSUM_NONE;
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
index c674f158efa8..b89a8c3186cd 100644
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@ -368,7 +368,7 @@ nf_ct_frag6_reasm(struct frag_queue *fq, struct net_device *dev)
368 } 368 }
369 369
370 /* Head of list must not be cloned. */ 370 /* Head of list must not be cloned. */
371 if (skb_cloned(head) && pskb_expand_head(head, 0, 0, GFP_ATOMIC)) { 371 if (skb_unclone(head, GFP_ATOMIC)) {
372 pr_debug("skb is cloned but can't expand head"); 372 pr_debug("skb is cloned but can't expand head");
373 goto out_oom; 373 goto out_oom;
374 } 374 }
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c
index bab2c270f292..e354743ed426 100644
--- a/net/ipv6/reassembly.c
+++ b/net/ipv6/reassembly.c
@@ -404,7 +404,7 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *prev,
404 goto out_oversize; 404 goto out_oversize;
405 405
406 /* Head of list must not be cloned. */ 406 /* Head of list must not be cloned. */
407 if (skb_cloned(head) && pskb_expand_head(head, 0, 0, GFP_ATOMIC)) 407 if (skb_unclone(head, GFP_ATOMIC))
408 goto out_oom; 408 goto out_oom;
409 409
410 /* If the first fragment is fragmented itself, we split 410 /* If the first fragment is fragmented itself, we split
diff --git a/net/ipv6/xfrm6_mode_tunnel.c b/net/ipv6/xfrm6_mode_tunnel.c
index 9f2095b19ad0..93c41a81c4c3 100644
--- a/net/ipv6/xfrm6_mode_tunnel.c
+++ b/net/ipv6/xfrm6_mode_tunnel.c
@@ -69,8 +69,7 @@ static int xfrm6_mode_tunnel_input(struct xfrm_state *x, struct sk_buff *skb)
69 if (!pskb_may_pull(skb, sizeof(struct ipv6hdr))) 69 if (!pskb_may_pull(skb, sizeof(struct ipv6hdr)))
70 goto out; 70 goto out;
71 71
72 if (skb_cloned(skb) && 72 if (err = skb_unclone(skb, GFP_ATOMIC))
73 (err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC)))
74 goto out; 73 goto out;
75 74
76 if (x->props.flags & XFRM_STATE_DECAP_DSCP) 75 if (x->props.flags & XFRM_STATE_DECAP_DSCP)