kernel-fxtec-pro1x/net/netfilter
Patrick McHardy 3b254c54ec netfilter: nf_conntrack_proto: fix warning with CONFIG_PROVE_RCU
===================================================
[ INFO: suspicious rcu_dereference_check() usage. ]
---------------------------------------------------
include/net/netfilter/nf_conntrack_l3proto.h:92 invoked rcu_dereference_check()
without protection!

other info that might help us debug this:

rcu_scheduler_active = 1, debug_locks = 0
2 locks held by iptables/3197:
 #0:  (sk_lock-AF_INET){+.+.+.}, at: [<ffffffff8149bd8c>]
ip_setsockopt+0x7c/0xa0
 #1:  (&xt[i].mutex){+.+.+.}, at: [<ffffffff8148a5fe>]
xt_find_table_lock+0x3e/0x110

stack backtrace:
Pid: 3197, comm: iptables Not tainted 2.6.34-rc4 #2
Call Trace:
 [<ffffffff8105e2e8>] lockdep_rcu_dereference+0xb8/0xc0
 [<ffffffff8147fb3b>] nf_ct_l3proto_module_put+0x6b/0x70
 [<ffffffff8148d891>] state_mt_destroy+0x11/0x20
 [<ffffffff814d3baf>] cleanup_match+0x2f/0x50
 [<ffffffff814d3c63>] cleanup_entry+0x33/0x90
 [<ffffffff814d5653>] ? __do_replace+0x1a3/0x210
 [<ffffffff814d564c>] __do_replace+0x19c/0x210
 [<ffffffff814d651a>] do_ipt_set_ctl+0x16a/0x1b0
 [<ffffffff8147a610>] nf_sockopt+0x60/0xa0
...

The __nf_ct_l3proto_find() call doesn't actually need rcu read side
protection since the caller holds a reference to the protocol. Use
rcu_read_lock() anyways to avoid the warning.

Kernel bugzilla #15781: https://bugzilla.kernel.org/show_bug.cgi?id=15781

Reported-by: Christian Casteyde <casteyde.christian@free.fr>
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-05-10 17:45:56 +02:00
..
ipvs Merge branch 'master' of /repos/git/net-next-2.6 2010-04-20 16:02:01 +02:00
core.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
Kconfig netfilter: xtables: inclusion of xt_TEE 2010-04-19 14:17:47 +02:00
Makefile netfilter: xtables: inclusion of xt_TEE 2010-04-19 14:17:47 +02:00
nf_conntrack_acct.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
nf_conntrack_amanda.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
nf_conntrack_core.c netfilter: nf_conntrack: extend with extra stat counter 2010-04-23 12:34:56 +02:00
nf_conntrack_ecache.c Merge branch 'master' of /repos/git/net-next-2.6 2010-04-20 16:02:01 +02:00
nf_conntrack_expect.c netfilter: nf_conntrack: add support for "conntrack zones" 2010-02-15 18:13:33 +01:00
nf_conntrack_extend.c netfilter: don't use INIT_RCU_HEAD() 2010-02-12 06:25:36 +01:00
nf_conntrack_ftp.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
nf_conntrack_h323_asn1.c [NETFILTER]: nf_conntrack_h323: constify and annotate H.323 helper 2008-01-31 19:28:07 -08:00
nf_conntrack_h323_main.c netfilter: nf_ct_h323: switch "incomplete TPKT" message to pr_debug() 2010-05-01 18:29:43 +02:00
nf_conntrack_h323_types.c [NETFILTER]: nf_conntrack_h323: constify and annotate H.323 helper 2008-01-31 19:28:07 -08:00
nf_conntrack_helper.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
nf_conntrack_irc.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
nf_conntrack_l3proto_generic.c [NETFILTER]: nf_conntrack: use bool type in struct nf_conntrack_l3proto 2008-04-14 11:15:52 +02:00
nf_conntrack_netbios_ns.c net: skb->rtable accessor 2009-06-03 02:51:02 -07:00
nf_conntrack_netlink.c Merge branch 'master' of /repos/git/net-next-2.6 2010-04-20 16:02:01 +02:00
nf_conntrack_pptp.c netfilter: nf_conntrack: add support for "conntrack zones" 2010-02-15 18:13:33 +01:00
nf_conntrack_proto.c netfilter: nf_conntrack_proto: fix warning with CONFIG_PROVE_RCU 2010-05-10 17:45:56 +02:00
nf_conntrack_proto_dccp.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
nf_conntrack_proto_generic.c sysctl net: Remove unused binary sysctl code 2009-11-12 02:05:06 -08:00
nf_conntrack_proto_gre.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
nf_conntrack_proto_sctp.c netfilter: nf_conntrack: split up IPCT_STATUS event 2010-02-03 13:48:53 +01:00
nf_conntrack_proto_tcp.c netfilter: nf_conntrack: pass template to l4proto ->error() handler 2010-02-15 17:45:08 +01:00
nf_conntrack_proto_udp.c netfilter: nf_conntrack: pass template to l4proto ->error() handler 2010-02-15 17:45:08 +01:00
nf_conntrack_proto_udplite.c netfilter: nf_conntrack: pass template to l4proto ->error() handler 2010-02-15 17:45:08 +01:00
nf_conntrack_sane.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
nf_conntrack_sip.c Merge branch 'for-next' into for-linus 2010-03-08 16:55:37 +01:00
nf_conntrack_standalone.c netfilter: nf_conntrack: extend with extra stat counter 2010-04-23 12:34:56 +02:00
nf_conntrack_tftp.c netfilter: nf_conntrack: connection tracking helper name persistent aliases 2008-11-17 16:01:42 +01:00
nf_internals.h netfilter: Use unsigned types for hooknum and pf vars 2008-10-08 11:35:00 +02:00
nf_log.c netfilter: remove invalid rcu_dereference() calls 2010-04-09 16:42:15 +02:00
nf_queue.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
nf_sockopt.c net: Make setsockopt() optlen be unsigned. 2009-09-30 16:12:20 -07:00
nf_tproxy_core.c net: Partially allow skb destructors to be used on receive path 2009-02-04 16:55:27 -08:00
nfnetlink.c Merge branch 'master' of /repos/git/net-next-2.6 2010-04-20 16:02:01 +02:00
nfnetlink_log.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
nfnetlink_queue.c Merge branch 'master' of /repos/git/net-next-2.6 2010-04-20 16:02:01 +02:00
x_tables.c netfilter: x_tables: move sleeping allocation outside BH-disabled region 2010-04-21 14:45:51 +02:00
xt_CLASSIFY.c netfilter: xtables: move extension arguments into compound structure (4/6) 2008-10-08 11:35:19 +02:00
xt_cluster.c netfilter: xtables: slightly better error reporting 2010-03-25 16:56:09 +01:00
xt_comment.c netfilter: xtables: use NFPROTO_UNSPEC in more extensions 2008-10-08 11:35:20 +02:00
xt_connbytes.c netfilter: xtables: shorten up return clause 2010-03-25 16:56:09 +01:00
xt_connlimit.c Merge branch 'master' of /repos/git/net-next-2.6 2010-04-20 16:02:01 +02:00
xt_connmark.c netfilter: xtables: shorten up return clause 2010-03-25 16:56:09 +01:00
xt_CONNSECMARK.c netfilter: xtables: shorten up return clause 2010-03-25 16:56:09 +01:00
xt_conntrack.c netfilter: xtables: shorten up return clause 2010-03-25 16:56:09 +01:00
xt_CT.c Merge branch 'master' of /repos/git/net-next-2.6 2010-04-20 16:02:01 +02:00
xt_dccp.c Merge branch 'master' of /repos/git/net-next-2.6 2010-04-20 16:02:01 +02:00
xt_dscp.c netfilter: xtables: slightly better error reporting 2010-03-25 16:56:09 +01:00
xt_DSCP.c netfilter: xtables: slightly better error reporting 2010-03-25 16:56:09 +01:00
xt_esp.c netfilter: xtables: change matches to return error code 2010-03-25 16:55:24 +01:00
xt_hashlimit.c Merge branch 'master' of /repos/git/net-next-2.6 2010-04-20 16:02:01 +02:00
xt_helper.c netfilter: xtables: slightly better error reporting 2010-03-25 16:56:09 +01:00
xt_hl.c netfilter: xt extensions: use pr_<level> 2010-03-18 14:20:07 +01:00
xt_HL.c netfilter: xtables: slightly better error reporting 2010-03-25 16:56:09 +01:00
xt_iprange.c netfilter: xt extensions: use pr_<level> (2) 2010-03-25 15:00:04 +01:00
xt_LED.c Merge branch 'master' of /repos/git/net-next-2.6 2010-04-20 16:02:01 +02:00
xt_length.c netfilter: xtables: move extension arguments into compound structure (1/6) 2008-10-08 11:35:18 +02:00
xt_limit.c Merge branch 'master' of /repos/git/net-next-2.6 2010-04-20 16:02:01 +02:00
xt_mac.c netfilter: xtables: limit xt_mac to ethernet devices 2010-03-18 14:20:06 +01:00
xt_mark.c netfilter: xtables: merge xt_MARK into xt_mark 2010-03-17 15:48:36 +01:00
xt_multiport.c netfilter: xtables: remove xt_multiport revision 0 2010-03-25 17:04:57 +01:00
xt_NFLOG.c netfilter: xtables: change targets to return error code 2010-03-25 16:55:49 +01:00
xt_NFQUEUE.c netfilter: xtables: slightly better error reporting 2010-03-25 16:56:09 +01:00
xt_NOTRACK.c netfilter: xtables: use NFPROTO_UNSPEC in more extensions 2008-10-08 11:35:20 +02:00
xt_osf.c netfilter: xt extensions: use pr_<level> 2010-03-18 14:20:07 +01:00
xt_owner.c netfilter: xtables: remove xt_owner v0 2009-08-10 13:32:30 +02:00
xt_physdev.c netfilter: xtables: change matches to return error code 2010-03-25 16:55:24 +01:00
xt_pkttype.c netfilter: xtables: cut down on static data for family-independent extensions 2008-10-08 11:35:20 +02:00
xt_policy.c netfilter: xtables: change matches to return error code 2010-03-25 16:55:24 +01:00
xt_quota.c Merge branch 'master' of /repos/git/net-next-2.6 2010-04-20 16:02:01 +02:00
xt_rateest.c netfilter: xtables: slightly better error reporting 2010-03-25 16:56:09 +01:00
xt_RATEEST.c Merge branch 'master' of /repos/git/net-next-2.6 2010-04-20 16:02:01 +02:00
xt_realm.c net: skb->dst accessors 2009-06-03 02:51:04 -07:00
xt_recent.c Merge branch 'master' of /repos/git/net-next-2.6 2010-04-20 16:02:01 +02:00
xt_repldata.h netfilter: xtables: generate initial table on-demand 2010-02-10 17:50:47 +01:00
xt_sctp.c netfilter: xtables: change matches to return error code 2010-03-25 16:55:24 +01:00
xt_SECMARK.c netfilter: xtables: slightly better error reporting 2010-03-25 16:56:09 +01:00
xt_socket.c netfilter: xt extensions: use pr_<level> (2) 2010-03-25 15:00:04 +01:00
xt_state.c netfilter: xtables: merge registration structure to NFPROTO_UNSPEC 2010-03-25 17:05:10 +01:00
xt_statistic.c Merge branch 'master' of /repos/git/net-next-2.6 2010-04-20 16:02:01 +02:00
xt_string.c Merge branch 'master' of /repos/git/net-next-2.6 2010-04-20 16:02:01 +02:00
xt_TCPMSS.c Merge branch 'master' of /repos/git/net-next-2.6 2010-04-20 16:02:01 +02:00
xt_tcpmss.c netfilter: xtables: move extension arguments into compound structure (1/6) 2008-10-08 11:35:18 +02:00
xt_TCPOPTSTRIP.c netfilter: update my email address 2010-03-17 15:53:10 +01:00
xt_tcpudp.c netfilter: xtables: change matches to return error code 2010-03-25 16:55:24 +01:00
xt_TEE.c netfilter: xt_TEE: resolve oif using netdevice notifiers 2010-04-20 15:07:32 +02:00
xt_time.c netfilter: xtables: slightly better error reporting 2010-03-25 16:56:09 +01:00
xt_TPROXY.c netfilter: xtables: change targets to return error code 2010-03-25 16:55:49 +01:00
xt_TRACE.c netfilter: xtables: move extension arguments into compound structure (4/6) 2008-10-08 11:35:19 +02:00
xt_u32.c netfilter: update my email address 2010-03-17 15:53:10 +01:00