diff options
-rw-r--r-- | net/ipv4/ip_fragment.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index 053869f2c49b..fb185d9a5cc7 100644 --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c | |||
@@ -143,8 +143,8 @@ static bool frag_expire_skip_icmp(u32 user) | |||
143 | static void ip_expire(struct timer_list *t) | 143 | static void ip_expire(struct timer_list *t) |
144 | { | 144 | { |
145 | struct inet_frag_queue *frag = from_timer(frag, t, timer); | 145 | struct inet_frag_queue *frag = from_timer(frag, t, timer); |
146 | struct sk_buff *clone, *head; | ||
147 | const struct iphdr *iph; | 146 | const struct iphdr *iph; |
147 | struct sk_buff *head; | ||
148 | struct net *net; | 148 | struct net *net; |
149 | struct ipq *qp; | 149 | struct ipq *qp; |
150 | int err; | 150 | int err; |
@@ -187,16 +187,12 @@ static void ip_expire(struct timer_list *t) | |||
187 | (skb_rtable(head)->rt_type != RTN_LOCAL)) | 187 | (skb_rtable(head)->rt_type != RTN_LOCAL)) |
188 | goto out; | 188 | goto out; |
189 | 189 | ||
190 | clone = skb_clone(head, GFP_ATOMIC); | 190 | skb_get(head); |
191 | spin_unlock(&qp->q.lock); | ||
192 | icmp_send(head, ICMP_TIME_EXCEEDED, ICMP_EXC_FRAGTIME, 0); | ||
193 | kfree_skb(head); | ||
194 | goto out_rcu_unlock; | ||
191 | 195 | ||
192 | /* Send an ICMP "Fragment Reassembly Timeout" message. */ | ||
193 | if (clone) { | ||
194 | spin_unlock(&qp->q.lock); | ||
195 | icmp_send(clone, ICMP_TIME_EXCEEDED, | ||
196 | ICMP_EXC_FRAGTIME, 0); | ||
197 | consume_skb(clone); | ||
198 | goto out_rcu_unlock; | ||
199 | } | ||
200 | out: | 196 | out: |
201 | spin_unlock(&qp->q.lock); | 197 | spin_unlock(&qp->q.lock); |
202 | out_rcu_unlock: | 198 | out_rcu_unlock: |