diff options
author | Pavel Emelianov <xemul@sw.ru> | 2007-04-17 15:45:31 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-17 16:13:31 -0400 |
commit | c2ecba71717c4f60671175fd26083c35a4b9ad58 (patch) | |
tree | b51d9e55cc4777254fed5d6b2056cc26d5ccda9f /net/core/neighbour.c | |
parent | 5e7d7fa57323dfb48fb09464cf4542daa7ce8a72 (diff) |
[NET]: Set a separate lockdep class for neighbour table's proxy_queue
Otherwise the following calltrace will lead to a wrong
lockdep warning:
neigh_proxy_process()
`- lock(neigh_table->proxy_queue.lock);
arp_redo /* via tbl->proxy_redo */
arp_process
neigh_event_ns
neigh_update
skb_queue_purge
`- lock(neighbor->arp_queue.lock);
This is not a deadlock actually, as neighbor table's proxy_queue
and the neighbor's arp_queue are different queues.
Lockdep thinks there is a deadlock as both queues are initialized
with skb_queue_head_init() and thus have a common class.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/neighbour.c')
-rw-r--r-- | net/core/neighbour.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index cfc60019cf9..841e3f32cab 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -1331,6 +1331,8 @@ void neigh_parms_destroy(struct neigh_parms *parms) | |||
1331 | kfree(parms); | 1331 | kfree(parms); |
1332 | } | 1332 | } |
1333 | 1333 | ||
1334 | static struct lock_class_key neigh_table_proxy_queue_class; | ||
1335 | |||
1334 | void neigh_table_init_no_netlink(struct neigh_table *tbl) | 1336 | void neigh_table_init_no_netlink(struct neigh_table *tbl) |
1335 | { | 1337 | { |
1336 | unsigned long now = jiffies; | 1338 | unsigned long now = jiffies; |
@@ -1379,7 +1381,8 @@ void neigh_table_init_no_netlink(struct neigh_table *tbl) | |||
1379 | init_timer(&tbl->proxy_timer); | 1381 | init_timer(&tbl->proxy_timer); |
1380 | tbl->proxy_timer.data = (unsigned long)tbl; | 1382 | tbl->proxy_timer.data = (unsigned long)tbl; |
1381 | tbl->proxy_timer.function = neigh_proxy_process; | 1383 | tbl->proxy_timer.function = neigh_proxy_process; |
1382 | skb_queue_head_init(&tbl->proxy_queue); | 1384 | skb_queue_head_init_class(&tbl->proxy_queue, |
1385 | &neigh_table_proxy_queue_class); | ||
1383 | 1386 | ||
1384 | tbl->last_flush = now; | 1387 | tbl->last_flush = now; |
1385 | tbl->last_rand = now + tbl->parms.reachable_time * 20; | 1388 | tbl->last_rand = now + tbl->parms.reachable_time * 20; |