aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2006-08-02 17:06:55 -0400
committerDavid S. Miller <davem@davemloft.net>2006-08-02 17:06:55 -0400
commit76f10ad0e67cbc6ded2ee143e5188e0b7ff9fb15 (patch)
treed7afe6a19eaa80587736a447a240faefde6bd4fc /include
parentdafee490858f79e144c5e6cdd84ceb9efa20a3f1 (diff)
[NET]: Remove lockdep_set_class() call from skb_queue_head_init().
The skb_queue_head_init() function is used both in drivers for private use and in the core networking code. The usage models are vastly set of functions that is only softirq safe; while the driver usage tends to be more limited to a few hardirq safe accessor functions. Rather than annotating all 133+ driver usages, for now just split this lock into a per queue class. This change is obviously safe and probably should make 2.6.18. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/skbuff.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index b91fbfb7d54c..b22d4a6083bd 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -606,10 +606,17 @@ static inline __u32 skb_queue_len(const struct sk_buff_head *list_)
606 606
607extern struct lock_class_key skb_queue_lock_key; 607extern struct lock_class_key skb_queue_lock_key;
608 608
609/*
610 * This function creates a split out lock class for each invocation;
611 * this is needed for now since a whole lot of users of the skb-queue
612 * infrastructure in drivers have different locking usage (in hardirq)
613 * than the networking core (in softirq only). In the long run either the
614 * network layer or drivers should need annotation to consolidate the
615 * main types of usage into 3 classes.
616 */
609static inline void skb_queue_head_init(struct sk_buff_head *list) 617static inline void skb_queue_head_init(struct sk_buff_head *list)
610{ 618{
611 spin_lock_init(&list->lock); 619 spin_lock_init(&list->lock);
612 lockdep_set_class(&list->lock, &skb_queue_lock_key);
613 list->prev = list->next = (struct sk_buff *)list; 620 list->prev = list->next = (struct sk_buff *)list;
614 list->qlen = 0; 621 list->qlen = 0;
615} 622}