From ee214d54bf3d51259adf8917e26dc84df1cab05a Mon Sep 17 00:00:00 2001 From: Andrey Vagin Date: Fri, 11 Apr 2014 21:34:20 +0400 Subject: netfilter: nf_conntrack: initialize net.ct.generation [ 251.920788] INFO: trying to register non-static key. [ 251.921386] the code is fine but needs lockdep annotation. [ 251.921386] turning off the locking correctness validator. [ 251.921386] CPU: 2 PID: 15715 Comm: socket_listen Not tainted 3.14.0+ #294 [ 251.921386] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 251.921386] 0000000000000000 000000009d18c210 ffff880075f039b8 ffffffff816b7ecd [ 251.921386] ffffffff822c3b10 ffff880075f039c8 ffffffff816b36f4 ffff880075f03aa0 [ 251.921386] ffffffff810c65ff ffffffff810c4a85 00000000fffffe01 ffffffffa0075172 [ 251.921386] Call Trace: [ 251.921386] [] dump_stack+0x45/0x56 [ 251.921386] [] register_lock_class.part.24+0x38/0x3c [ 251.921386] [] __lock_acquire+0x168f/0x1b40 [ 251.921386] [] ? trace_hardirqs_on_caller+0x105/0x1d0 [ 251.921386] [] ? nf_nat_setup_info+0x252/0x3a0 [nf_nat] [ 251.921386] [] ? _raw_spin_unlock_bh+0x35/0x40 [ 251.921386] [] ? nf_nat_setup_info+0x252/0x3a0 [nf_nat] [ 251.921386] [] lock_acquire+0xa2/0x120 [ 251.921386] [] ? ipv4_confirm+0x90/0xf0 [nf_conntrack_ipv4] [ 251.921386] [] __nf_conntrack_confirm+0x129/0x410 [nf_conntrack] [ 251.921386] [] ? ipv4_confirm+0x90/0xf0 [nf_conntrack_ipv4] [ 251.921386] [] ipv4_confirm+0x90/0xf0 [nf_conntrack_ipv4] [ 251.921386] [] ? ip_fragment+0x9f0/0x9f0 [ 251.921386] [] nf_iterate+0xaa/0xc0 [ 251.921386] [] ? ip_fragment+0x9f0/0x9f0 [ 251.921386] [] nf_hook_slow+0xa4/0x190 [ 251.921386] [] ? ip_fragment+0x9f0/0x9f0 [ 251.921386] [] ip_output+0x92/0x100 [ 251.921386] [] ip_local_out+0x29/0x90 [ 251.921386] [] ip_queue_xmit+0x170/0x4c0 [ 251.921386] [] ? ip_queue_xmit+0x5/0x4c0 [ 251.921386] [] tcp_transmit_skb+0x498/0x960 [ 251.921386] [] tcp_connect+0x812/0x960 [ 251.921386] [] ? ktime_get_real+0x25/0x70 [ 251.921386] [] ? secure_tcp_sequence_number+0x6a/0xc0 [ 251.921386] [] tcp_v4_connect+0x317/0x470 [ 251.921386] [] __inet_stream_connect+0xb5/0x330 [ 251.921386] [] ? lock_sock_nested+0x33/0xa0 [ 251.921386] [] ? trace_hardirqs_on+0xd/0x10 [ 251.921386] [] ? __local_bh_enable_ip+0x75/0xe0 [ 251.921386] [] inet_stream_connect+0x38/0x50 [ 251.921386] [] SYSC_connect+0xe7/0x120 [ 251.921386] [] ? current_kernel_time+0x69/0xd0 [ 251.921386] [] ? trace_hardirqs_on_caller+0x105/0x1d0 [ 251.921386] [] ? trace_hardirqs_on+0xd/0x10 [ 251.921386] [] SyS_connect+0xe/0x10 [ 251.921386] [] system_call_fastpath+0x16/0x1b [ 312.014104] INFO: rcu_sched detected stalls on CPUs/tasks: {} (detected by 0, t=60003 jiffies, g=42359, c=42358, q=333) [ 312.015097] INFO: Stall ended before state dump start Fixes: 93bb0ceb75be ("netfilter: conntrack: remove central spinlock nf_conntrack_lock") Cc: Jesper Dangaard Brouer Cc: Pablo Neira Ayuso Cc: Patrick McHardy Cc: Jozsef Kadlecsik Cc: "David S. Miller" Signed-off-by: Andrey Vagin Signed-off-by: Pablo Neira Ayuso --- net/netfilter/nf_conntrack_core.c | 1 + 1 file changed, 1 insertion(+) (limited to 'net') diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 6dba48efe01e..75421f2ba8be 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c @@ -1795,6 +1795,7 @@ int nf_conntrack_init_net(struct net *net) int cpu; atomic_set(&net->ct.count, 0); + seqcount_init(&net->ct.generation); net->ct.pcpu_lists = alloc_percpu(struct ct_pcpu); if (!net->ct.pcpu_lists) -- cgit v1.2.3