diff options
Diffstat (limited to 'net/core/neighbour.c')
| -rw-r--r-- | net/core/neighbour.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 3183142c6044..841e3f32cab1 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
| @@ -140,6 +140,8 @@ static int neigh_forced_gc(struct neigh_table *tbl) | |||
| 140 | n->dead = 1; | 140 | n->dead = 1; |
| 141 | shrunk = 1; | 141 | shrunk = 1; |
| 142 | write_unlock(&n->lock); | 142 | write_unlock(&n->lock); |
| 143 | if (n->parms->neigh_cleanup) | ||
| 144 | n->parms->neigh_cleanup(n); | ||
| 143 | neigh_release(n); | 145 | neigh_release(n); |
| 144 | continue; | 146 | continue; |
| 145 | } | 147 | } |
| @@ -211,6 +213,8 @@ static void neigh_flush_dev(struct neigh_table *tbl, struct net_device *dev) | |||
| 211 | NEIGH_PRINTK2("neigh %p is stray.\n", n); | 213 | NEIGH_PRINTK2("neigh %p is stray.\n", n); |
| 212 | } | 214 | } |
| 213 | write_unlock(&n->lock); | 215 | write_unlock(&n->lock); |
| 216 | if (n->parms->neigh_cleanup) | ||
| 217 | n->parms->neigh_cleanup(n); | ||
| 214 | neigh_release(n); | 218 | neigh_release(n); |
| 215 | } | 219 | } |
| 216 | } | 220 | } |
| @@ -582,9 +586,6 @@ void neigh_destroy(struct neighbour *neigh) | |||
| 582 | kfree(hh); | 586 | kfree(hh); |
| 583 | } | 587 | } |
| 584 | 588 | ||
| 585 | if (neigh->parms->neigh_destructor) | ||
| 586 | (neigh->parms->neigh_destructor)(neigh); | ||
| 587 | |||
| 588 | skb_queue_purge(&neigh->arp_queue); | 589 | skb_queue_purge(&neigh->arp_queue); |
| 589 | 590 | ||
| 590 | dev_put(neigh->dev); | 591 | dev_put(neigh->dev); |
| @@ -675,6 +676,8 @@ static void neigh_periodic_timer(unsigned long arg) | |||
| 675 | *np = n->next; | 676 | *np = n->next; |
| 676 | n->dead = 1; | 677 | n->dead = 1; |
| 677 | write_unlock(&n->lock); | 678 | write_unlock(&n->lock); |
| 679 | if (n->parms->neigh_cleanup) | ||
| 680 | n->parms->neigh_cleanup(n); | ||
| 678 | neigh_release(n); | 681 | neigh_release(n); |
| 679 | continue; | 682 | continue; |
| 680 | } | 683 | } |
| @@ -1328,6 +1331,8 @@ void neigh_parms_destroy(struct neigh_parms *parms) | |||
| 1328 | kfree(parms); | 1331 | kfree(parms); |
| 1329 | } | 1332 | } |
| 1330 | 1333 | ||
| 1334 | static struct lock_class_key neigh_table_proxy_queue_class; | ||
| 1335 | |||
| 1331 | void neigh_table_init_no_netlink(struct neigh_table *tbl) | 1336 | void neigh_table_init_no_netlink(struct neigh_table *tbl) |
| 1332 | { | 1337 | { |
| 1333 | unsigned long now = jiffies; | 1338 | unsigned long now = jiffies; |
| @@ -1376,7 +1381,8 @@ void neigh_table_init_no_netlink(struct neigh_table *tbl) | |||
| 1376 | init_timer(&tbl->proxy_timer); | 1381 | init_timer(&tbl->proxy_timer); |
| 1377 | tbl->proxy_timer.data = (unsigned long)tbl; | 1382 | tbl->proxy_timer.data = (unsigned long)tbl; |
| 1378 | tbl->proxy_timer.function = neigh_proxy_process; | 1383 | tbl->proxy_timer.function = neigh_proxy_process; |
| 1379 | skb_queue_head_init(&tbl->proxy_queue); | 1384 | skb_queue_head_init_class(&tbl->proxy_queue, |
| 1385 | &neigh_table_proxy_queue_class); | ||
| 1380 | 1386 | ||
| 1381 | tbl->last_flush = now; | 1387 | tbl->last_flush = now; |
| 1382 | tbl->last_rand = now + tbl->parms.reachable_time * 20; | 1388 | tbl->last_rand = now + tbl->parms.reachable_time * 20; |
| @@ -2088,8 +2094,11 @@ void __neigh_for_each_release(struct neigh_table *tbl, | |||
| 2088 | } else | 2094 | } else |
| 2089 | np = &n->next; | 2095 | np = &n->next; |
| 2090 | write_unlock(&n->lock); | 2096 | write_unlock(&n->lock); |
| 2091 | if (release) | 2097 | if (release) { |
| 2098 | if (n->parms->neigh_cleanup) | ||
| 2099 | n->parms->neigh_cleanup(n); | ||
| 2092 | neigh_release(n); | 2100 | neigh_release(n); |
| 2101 | } | ||
| 2093 | } | 2102 | } |
| 2094 | } | 2103 | } |
| 2095 | } | 2104 | } |
