From c8178ad76a6ae2262926cf580a2e35f352137a23 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Mon, 3 Jul 2006 00:25:09 -0700 Subject: [PATCH] --- yaml --- r: 31820 b: refs/heads/master c: 06825ba3553151eea24206bc53d4fc3de49e0ab1 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/skbuff.h | 3 +++ trunk/net/core/skbuff.c | 7 +++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 985b968bae6b..f2016987684e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3aceafc1e2596f1c2c4e053126561f00b68e3a1a +refs/heads/master: 06825ba3553151eea24206bc53d4fc3de49e0ab1 diff --git a/trunk/include/linux/skbuff.h b/trunk/include/linux/skbuff.h index 57d7d4965f9a..3597b4f14389 100644 --- a/trunk/include/linux/skbuff.h +++ b/trunk/include/linux/skbuff.h @@ -604,9 +604,12 @@ static inline __u32 skb_queue_len(const struct sk_buff_head *list_) return list_->qlen; } +extern struct lock_class_key skb_queue_lock_key; + static inline void skb_queue_head_init(struct sk_buff_head *list) { spin_lock_init(&list->lock); + lockdep_set_class(&list->lock, &skb_queue_lock_key); list->prev = list->next = (struct sk_buff *)list; list->qlen = 0; } diff --git a/trunk/net/core/skbuff.c b/trunk/net/core/skbuff.c index 7cfbdb215ba2..44f6a181a754 100644 --- a/trunk/net/core/skbuff.c +++ b/trunk/net/core/skbuff.c @@ -70,6 +70,13 @@ static kmem_cache_t *skbuff_head_cache __read_mostly; static kmem_cache_t *skbuff_fclone_cache __read_mostly; +/* + * lockdep: lock class key used by skb_queue_head_init(): + */ +struct lock_class_key skb_queue_lock_key; + +EXPORT_SYMBOL(skb_queue_lock_key); + /* * Keep out-of-line to prevent kernel bloat. * __builtin_return_address is not used because it is not always