netfilter: conntrack: init all_locks to avoid debug warning
authorFlorian Westphal <fw@strlen.de>
Sat, 23 Apr 2016 23:17:14 +0000 (01:17 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 29 Apr 2016 09:27:10 +0000 (11:27 +0200)
Else we get 'BUG: spinlock bad magic on CPU#' on resize when
spin lock debugging is enabled.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conntrack_core.c

index afde5f5e728a320773be246ecbcfcca7f5a16617..895d11dced3c10384c75637e4f3c5a7e468871cc 100644 (file)
@@ -66,7 +66,7 @@ EXPORT_SYMBOL_GPL(nf_conntrack_locks);
 __cacheline_aligned_in_smp DEFINE_SPINLOCK(nf_conntrack_expect_lock);
 EXPORT_SYMBOL_GPL(nf_conntrack_expect_lock);
 
-static __read_mostly spinlock_t nf_conntrack_locks_all_lock;
+static __read_mostly DEFINE_SPINLOCK(nf_conntrack_locks_all_lock);
 static __read_mostly bool nf_conntrack_locks_all;
 
 void nf_conntrack_lock(spinlock_t *lock) __acquires(lock)