diff options
-rw-r--r-- | net/core/neighbour.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 2569ab2cafbe..b7de821f98df 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -231,7 +231,7 @@ static void neigh_flush_dev(struct neigh_table *tbl, struct net_device *dev) | |||
231 | we must kill timers etc. and move | 231 | we must kill timers etc. and move |
232 | it to safe state. | 232 | it to safe state. |
233 | */ | 233 | */ |
234 | skb_queue_purge(&n->arp_queue); | 234 | __skb_queue_purge(&n->arp_queue); |
235 | n->arp_queue_len_bytes = 0; | 235 | n->arp_queue_len_bytes = 0; |
236 | n->output = neigh_blackhole; | 236 | n->output = neigh_blackhole; |
237 | if (n->nud_state & NUD_VALID) | 237 | if (n->nud_state & NUD_VALID) |
@@ -286,7 +286,7 @@ static struct neighbour *neigh_alloc(struct neigh_table *tbl, struct net_device | |||
286 | if (!n) | 286 | if (!n) |
287 | goto out_entries; | 287 | goto out_entries; |
288 | 288 | ||
289 | skb_queue_head_init(&n->arp_queue); | 289 | __skb_queue_head_init(&n->arp_queue); |
290 | rwlock_init(&n->lock); | 290 | rwlock_init(&n->lock); |
291 | seqlock_init(&n->ha_lock); | 291 | seqlock_init(&n->ha_lock); |
292 | n->updated = n->used = now; | 292 | n->updated = n->used = now; |
@@ -708,7 +708,9 @@ void neigh_destroy(struct neighbour *neigh) | |||
708 | if (neigh_del_timer(neigh)) | 708 | if (neigh_del_timer(neigh)) |
709 | pr_warn("Impossible event\n"); | 709 | pr_warn("Impossible event\n"); |
710 | 710 | ||
711 | skb_queue_purge(&neigh->arp_queue); | 711 | write_lock_bh(&neigh->lock); |
712 | __skb_queue_purge(&neigh->arp_queue); | ||
713 | write_unlock_bh(&neigh->lock); | ||
712 | neigh->arp_queue_len_bytes = 0; | 714 | neigh->arp_queue_len_bytes = 0; |
713 | 715 | ||
714 | if (dev->netdev_ops->ndo_neigh_destroy) | 716 | if (dev->netdev_ops->ndo_neigh_destroy) |
@@ -858,7 +860,7 @@ static void neigh_invalidate(struct neighbour *neigh) | |||
858 | neigh->ops->error_report(neigh, skb); | 860 | neigh->ops->error_report(neigh, skb); |
859 | write_lock(&neigh->lock); | 861 | write_lock(&neigh->lock); |
860 | } | 862 | } |
861 | skb_queue_purge(&neigh->arp_queue); | 863 | __skb_queue_purge(&neigh->arp_queue); |
862 | neigh->arp_queue_len_bytes = 0; | 864 | neigh->arp_queue_len_bytes = 0; |
863 | } | 865 | } |
864 | 866 | ||
@@ -1210,7 +1212,7 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, | |||
1210 | 1212 | ||
1211 | write_lock_bh(&neigh->lock); | 1213 | write_lock_bh(&neigh->lock); |
1212 | } | 1214 | } |
1213 | skb_queue_purge(&neigh->arp_queue); | 1215 | __skb_queue_purge(&neigh->arp_queue); |
1214 | neigh->arp_queue_len_bytes = 0; | 1216 | neigh->arp_queue_len_bytes = 0; |
1215 | } | 1217 | } |
1216 | out: | 1218 | out: |