[NDISC]: Fix race in generic address resolution
[linux-2.6-block.git] / net / core / neighbour.c
index a16cf1ec5e5ebe9fc100cb027c740c9387184472..7bb6a9a1256df6a082d0792feca42db7d18ec0f5 100644 (file)
@@ -834,18 +834,12 @@ static void neigh_timer_handler(unsigned long arg)
        }
        if (neigh->nud_state & (NUD_INCOMPLETE | NUD_PROBE)) {
                struct sk_buff *skb = skb_peek(&neigh->arp_queue);
-               /* keep skb alive even if arp_queue overflows */
-               if (skb)
-                       skb_get(skb);
-               write_unlock(&neigh->lock);
+
                neigh->ops->solicit(neigh, skb);
                atomic_inc(&neigh->probes);
-               if (skb)
-                       kfree_skb(skb);
-       } else {
-out:
-               write_unlock(&neigh->lock);
        }
+out:
+       write_unlock(&neigh->lock);
 
        if (notify)
                neigh_update_notify(neigh);