linux/net/netfilter
Sasha Levin b16c29191d netfilter: nf_conntrack: use safer way to lock all buckets
When we need to lock all buckets in the connection hashtable we'd attempt to
lock 1024 spinlocks, which is way more preemption levels than supported by
the kernel. Furthermore, this behavior was hidden by checking if lockdep is
enabled, and if it was - use only 8 buckets(!).

Fix this by using a global lock and synchronize all buckets on it when we
need to lock them all. This is pretty heavyweight, but is only done when we
need to resize the hashtable, and that doesn't happen often enough (or at all).

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Reviewed-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2016-01-20 14:15:31 +01:00
..
ipset netfilter: ipset: allow a 0 netmask with hash_netiface type 2016-01-13 14:03:43 +01:00
ipvs sctp: Rename NETIF_F_SCTP_CSUM to NETIF_F_SCTP_CRC 2015-12-15 16:49:58 -05:00
Kconfig netfilter: nf_tables: add forward expression to the netdev family 2016-01-04 17:48:38 +01:00
Makefile netfilter: nf_tables: add forward expression to the netdev family 2016-01-04 17:48:38 +01:00
core.c
nf_conntrack_acct.c
nf_conntrack_amanda.c
nf_conntrack_broadcast.c
nf_conntrack_core.c netfilter: nf_conntrack: use safer way to lock all buckets 2016-01-20 14:15:31 +01:00
nf_conntrack_ecache.c
nf_conntrack_expect.c netfilter: Set /proc/net entries owner to root in namespace 2015-11-25 13:54:09 +01:00
nf_conntrack_extend.c
nf_conntrack_ftp.c netfilter: nf_ct_helper: define pr_fmt() 2016-01-04 17:48:51 +01:00
nf_conntrack_h323_asn1.c
nf_conntrack_h323_main.c
nf_conntrack_h323_types.c
nf_conntrack_helper.c netfilter: nf_conntrack: use safer way to lock all buckets 2016-01-20 14:15:31 +01:00
nf_conntrack_irc.c netfilter: nf_ct_helper: define pr_fmt() 2016-01-04 17:48:51 +01:00
nf_conntrack_l3proto_generic.c
nf_conntrack_labels.c
nf_conntrack_netbios_ns.c
nf_conntrack_netlink.c netfilter: nf_conntrack: use safer way to lock all buckets 2016-01-20 14:15:31 +01:00
nf_conntrack_pptp.c
nf_conntrack_proto.c
nf_conntrack_proto_dccp.c
nf_conntrack_proto_generic.c
nf_conntrack_proto_gre.c
nf_conntrack_proto_sctp.c
nf_conntrack_proto_tcp.c
nf_conntrack_proto_udp.c
nf_conntrack_proto_udplite.c
nf_conntrack_sane.c netfilter: nf_ct_helper: define pr_fmt() 2016-01-04 17:48:51 +01:00
nf_conntrack_seqadj.c
nf_conntrack_sip.c netfilter: nf_ct_helper: define pr_fmt() 2016-01-04 17:48:51 +01:00
nf_conntrack_snmp.c
nf_conntrack_standalone.c netfilter: Set /proc/net entries owner to root in namespace 2015-11-25 13:54:09 +01:00
nf_conntrack_tftp.c netfilter: nf_ct_helper: define pr_fmt() 2016-01-04 17:48:51 +01:00
nf_conntrack_timeout.c netfilter: cttimeout: add netns support 2015-12-14 12:48:58 +01:00
nf_conntrack_timestamp.c
nf_dup_netdev.c netfilter: nf_tables: add packet duplication to the netdev family 2016-01-03 21:04:23 +01:00
nf_internals.h
nf_log.c
nf_log_common.c
nf_nat_amanda.c
nf_nat_core.c
nf_nat_ftp.c
nf_nat_helper.c
nf_nat_irc.c
nf_nat_proto_common.c
nf_nat_proto_dccp.c
nf_nat_proto_sctp.c
nf_nat_proto_tcp.c
nf_nat_proto_udp.c
nf_nat_proto_udplite.c
nf_nat_proto_unknown.c
nf_nat_redirect.c
nf_nat_sip.c
nf_nat_tftp.c
nf_queue.c
nf_sockopt.c
nf_synproxy_core.c
nf_tables_api.c netfilter: nf_tables: Add new attributes into nft_set to store user data. 2016-01-08 13:25:08 +01:00
nf_tables_core.c netfilter: nf_tables: fix nf_log_trace based tracing 2015-12-09 16:53:46 +01:00
nf_tables_inet.c netfilter: nf_tables: release objects on netns destruction 2015-12-28 18:34:35 +01:00
nf_tables_netdev.c netfilter: nf_tables_netdev: fix error path in module initialization 2016-01-18 13:53:37 +01:00
nf_tables_trace.c netfilter: nf_tables: wrap tracing with a static key 2015-12-09 13:23:13 +01:00
nfnetlink.c netfilter: nfnetlink: pass down netns pointer to commit() and abort() callbacks 2015-12-28 18:43:15 +01:00
nfnetlink_acct.c netfilter: nfnetlink: pass down netns pointer to call() and call_rcu() 2015-12-28 18:41:41 +01:00
nfnetlink_cthelper.c netfilter: nfnetlink: pass down netns pointer to call() and call_rcu() 2015-12-28 18:41:41 +01:00
nfnetlink_cttimeout.c netfilter: nf_conntrack: use safer way to lock all buckets 2016-01-20 14:15:31 +01:00
nfnetlink_log.c netfilter: nfnetlink_log: just returns error for unknown command 2016-01-08 13:25:07 +01:00
nfnetlink_queue.c netfilter: nfnetlink_queue: autoload nf_conntrack_netlink module NFQA_CFG_F_CONNTRACK config flag 2016-01-08 13:25:06 +01:00
nft_bitwise.c
nft_byteorder.c netfilter: nft_byteorder: avoid unneeded le/be conversion steps 2016-01-13 14:02:59 +01:00
nft_cmp.c
nft_compat.c netfilter: nfnetlink: pass down netns pointer to call() and call_rcu() 2015-12-28 18:41:41 +01:00
nft_counter.c netfilter: nf_tables: add clone interface to expression operations 2015-11-10 23:47:32 +01:00
nft_ct.c netfilter: nft_ct: keep counters away from CONFIG_NF_CONNTRACK_LABELS 2016-01-14 19:41:16 +01:00
nft_dup_netdev.c netfilter: nf_tables: add packet duplication to the netdev family 2016-01-03 21:04:23 +01:00
nft_dynset.c netfilter: nf_tables: add clone interface to expression operations 2015-11-10 23:47:32 +01:00
nft_exthdr.c
nft_fwd_netdev.c netfilter: nf_tables: add forward expression to the netdev family 2016-01-04 17:48:38 +01:00
nft_hash.c
nft_immediate.c
nft_limit.c netfilter: nft_limit: allow to invert matching criteria 2016-01-03 20:58:52 +01:00
nft_log.c
nft_lookup.c
nft_masq.c
nft_meta.c netfilter: meta: add support for setting skb->pkttype 2015-12-18 14:12:56 +01:00
nft_nat.c
nft_payload.c netfilter: nft_payload: add packet mangling support 2015-11-25 13:54:51 +01:00
nft_queue.c
nft_rbtree.c
nft_redir.c
nft_reject.c
nft_reject_inet.c
x_tables.c netfilter: Set /proc/net entries owner to root in namespace 2015-11-25 13:54:09 +01:00
xt_AUDIT.c
xt_CHECKSUM.c
xt_CLASSIFY.c
xt_CONNSECMARK.c
xt_CT.c netfilter: cttimeout: add netns support 2015-12-14 12:48:58 +01:00
xt_DSCP.c
xt_HL.c
xt_HMARK.c
xt_IDLETIMER.c
xt_LED.c
xt_LOG.c
xt_NETMAP.c
xt_NFLOG.c
xt_NFQUEUE.c
xt_RATEEST.c
xt_REDIRECT.c
xt_SECMARK.c
xt_TCPMSS.c netfilter: xt_TCPMSS: handle CHECKSUM_COMPLETE in tcpmss_tg6() 2016-01-18 12:18:17 +01:00
xt_TCPOPTSTRIP.c
xt_TEE.c
xt_TPROXY.c
xt_TRACE.c
xt_addrtype.c
xt_bpf.c
xt_cgroup.c netfilter: implement xt_cgroup cgroup2 path match 2015-12-14 20:34:55 +01:00
xt_cluster.c
xt_comment.c
xt_connbytes.c
xt_connlabel.c
xt_connlimit.c
xt_connmark.c
xt_conntrack.c
xt_cpu.c
xt_dccp.c
xt_devgroup.c
xt_dscp.c
xt_ecn.c
xt_esp.c
xt_hashlimit.c
xt_helper.c
xt_hl.c
xt_ipcomp.c
xt_iprange.c
xt_ipvs.c
xt_l2tp.c
xt_length.c
xt_limit.c
xt_mac.c
xt_mark.c
xt_multiport.c
xt_nat.c
xt_nfacct.c
xt_osf.c netfilter: nfnetlink: pass down netns pointer to call() and call_rcu() 2015-12-28 18:41:41 +01:00
xt_owner.c netfilter: xt_owner: use skb_to_full_sk() helper 2015-11-08 20:56:39 -05:00
xt_physdev.c
xt_pkttype.c
xt_policy.c
xt_quota.c
xt_rateest.c
xt_realm.c
xt_recent.c
xt_repldata.h
xt_sctp.c
xt_set.c
xt_socket.c
xt_state.c
xt_statistic.c
xt_string.c
xt_tcpmss.c
xt_tcpudp.c
xt_time.c
xt_u32.c