summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPavel Emelianov <xemul@sw.ru>2007-04-17 12:45:31 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-17 13:13:31 -0700
commitc2ecba71717c4f60671175fd26083c35a4b9ad58 (patch)
treeb51d9e55cc4777254fed5d6b2056cc26d5ccda9f /include
parent5e7d7fa57323dfb48fb09464cf4542daa7ce8a72 (diff)
downloadlinux-next-c2ecba71717c4f60671175fd26083c35a4b9ad58.tar.gz
[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 'include')
-rw-r--r--include/linux/skbuff.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 0e86b6007a0a..5992f65b4184 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -619,6 +619,13 @@ static inline void skb_queue_head_init(struct sk_buff_head *list)
list->qlen = 0;
}
+static inline void skb_queue_head_init_class(struct sk_buff_head *list,
+ struct lock_class_key *class)
+{
+ skb_queue_head_init(list);
+ lockdep_set_class(&list->lock, class);
+}
+
/*
* Insert an sk_buff at the start of a list.
*