* [PATCH nf] netfilter: conntrack: init all_locks to avoid debug warning
@ 2016-04-23 23:17 Florian Westphal
2016-04-29 9:23 ` Pablo Neira Ayuso
0 siblings, 1 reply; 4+ messages in thread
From: Florian Westphal @ 2016-04-23 23:17 UTC (permalink / raw)
To: netfilter-devel; +Cc: Florian Westphal
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>
---
net/netfilter/nf_conntrack_core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index afde5f5..2bbb962 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -1659,6 +1659,8 @@ int nf_conntrack_init_start(void)
for (i = 0; i < CONNTRACK_LOCKS; i++)
spin_lock_init(&nf_conntrack_locks[i]);
+ spin_lock_init(&nf_conntrack_locks_all_lock);
+
if (!nf_conntrack_htable_size) {
/* Idea from tcp.c: use 1/16384 of memory.
* On i386: 32MB machine has 512 buckets.
--
2.7.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH nf] netfilter: conntrack: init all_locks to avoid debug warning
2016-04-23 23:17 [PATCH nf] netfilter: conntrack: init all_locks to avoid debug warning Florian Westphal
@ 2016-04-29 9:23 ` Pablo Neira Ayuso
2016-04-29 9:27 ` Pablo Neira Ayuso
0 siblings, 1 reply; 4+ messages in thread
From: Pablo Neira Ayuso @ 2016-04-29 9:23 UTC (permalink / raw)
To: Florian Westphal; +Cc: netfilter-devel
On Sun, Apr 24, 2016 at 01:17:14AM +0200, Florian Westphal wrote:
> Else we get 'BUG: spinlock bad magic on CPU#' on resize when
> spin lock debugging is enabled.
Applied, thanks Florian.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH nf] netfilter: conntrack: init all_locks to avoid debug warning
2016-04-29 9:23 ` Pablo Neira Ayuso
@ 2016-04-29 9:27 ` Pablo Neira Ayuso
2016-04-29 9:31 ` Florian Westphal
0 siblings, 1 reply; 4+ messages in thread
From: Pablo Neira Ayuso @ 2016-04-29 9:27 UTC (permalink / raw)
To: Florian Westphal; +Cc: netfilter-devel
[-- Attachment #1: Type: text/plain, Size: 295 bytes --]
On Fri, Apr 29, 2016 at 11:23:07AM +0200, Pablo Neira Ayuso wrote:
> On Sun, Apr 24, 2016 at 01:17:14AM +0200, Florian Westphal wrote:
> > Else we get 'BUG: spinlock bad magic on CPU#' on resize when
> > spin lock debugging is enabled.
>
> Applied, thanks Florian.
Wait, probably better this?
[-- Attachment #2: x.patch --]
[-- Type: text/x-diff, Size: 1025 bytes --]
commit 70d72b7e060e0a16b9ded9d0fbd3dff109743de3
Author: Florian Westphal <fw@strlen.de>
Date: Sun Apr 24 01:17:14 2016 +0200
netfilter: conntrack: init all_locks to avoid debug warning
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>
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index afde5f5..895d11d 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -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)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH nf] netfilter: conntrack: init all_locks to avoid debug warning
2016-04-29 9:27 ` Pablo Neira Ayuso
@ 2016-04-29 9:31 ` Florian Westphal
0 siblings, 0 replies; 4+ messages in thread
From: Florian Westphal @ 2016-04-29 9:31 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: Florian Westphal, netfilter-devel
Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> On Fri, Apr 29, 2016 at 11:23:07AM +0200, Pablo Neira Ayuso wrote:
> > On Sun, Apr 24, 2016 at 01:17:14AM +0200, Florian Westphal wrote:
> > > Else we get 'BUG: spinlock bad magic on CPU#' on resize when
> > > spin lock debugging is enabled.
> >
> > Applied, thanks Florian.
>
> Wait, probably better this?
I have no preference, either patch works for me.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-04-29 9:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-23 23:17 [PATCH nf] netfilter: conntrack: init all_locks to avoid debug warning Florian Westphal
2016-04-29 9:23 ` Pablo Neira Ayuso
2016-04-29 9:27 ` Pablo Neira Ayuso
2016-04-29 9:31 ` Florian Westphal
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.