diff options
Diffstat (limited to 'net/ipv6/ipcomp6.c')
-rw-r--r-- | net/ipv6/ipcomp6.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c index cec3be544b69..f28cd37feed3 100644 --- a/net/ipv6/ipcomp6.c +++ b/net/ipv6/ipcomp6.c | |||
@@ -65,7 +65,7 @@ static LIST_HEAD(ipcomp6_tfms_list); | |||
65 | 65 | ||
66 | static int ipcomp6_input(struct xfrm_state *x, struct sk_buff *skb) | 66 | static int ipcomp6_input(struct xfrm_state *x, struct sk_buff *skb) |
67 | { | 67 | { |
68 | int err = 0; | 68 | int err = -ENOMEM; |
69 | struct ipv6hdr *iph; | 69 | struct ipv6hdr *iph; |
70 | struct ipv6_comp_hdr *ipch; | 70 | struct ipv6_comp_hdr *ipch; |
71 | int plen, dlen; | 71 | int plen, dlen; |
@@ -74,11 +74,8 @@ static int ipcomp6_input(struct xfrm_state *x, struct sk_buff *skb) | |||
74 | struct crypto_tfm *tfm; | 74 | struct crypto_tfm *tfm; |
75 | int cpu; | 75 | int cpu; |
76 | 76 | ||
77 | if ((skb_is_nonlinear(skb) || skb_cloned(skb)) && | 77 | if (skb_linearize_cow(skb)) |
78 | skb_linearize(skb, GFP_ATOMIC) != 0) { | ||
79 | err = -ENOMEM; | ||
80 | goto out; | 78 | goto out; |
81 | } | ||
82 | 79 | ||
83 | skb->ip_summed = CHECKSUM_NONE; | 80 | skb->ip_summed = CHECKSUM_NONE; |
84 | 81 | ||
@@ -142,10 +139,8 @@ static int ipcomp6_output(struct xfrm_state *x, struct sk_buff *skb) | |||
142 | goto out_ok; | 139 | goto out_ok; |
143 | } | 140 | } |
144 | 141 | ||
145 | if ((skb_is_nonlinear(skb) || skb_cloned(skb)) && | 142 | if (skb_linearize_cow(skb)) |
146 | skb_linearize(skb, GFP_ATOMIC) != 0) { | ||
147 | goto out_ok; | 143 | goto out_ok; |
148 | } | ||
149 | 144 | ||
150 | /* compression */ | 145 | /* compression */ |
151 | plen = skb->len - hdr_len; | 146 | plen = skb->len - hdr_len; |