3
0
Fork 0
forked from mirrors/linux
kernel/net/ipv4/netfilter
Sebastian Andrzej Siewior a1f1acb9c5 netfilter: nf_dup{4, 6}: Move duplication check to task_struct
nf_skb_duplicated is a per-CPU variable and relies on disabled BH for its
locking. Without per-CPU locking in local_bh_disable() on PREEMPT_RT
this data structure requires explicit locking.

Due to the recursion involved, the simplest change is to make it a
per-task variable.

Move the per-CPU variable nf_skb_duplicated to task_struct and name it
in_nf_duplicate. Add it to the existing bitfield so it doesn't use
additional memory.

Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ben Segall <bsegall@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Valentin Schneider <vschneid@redhat.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2025-05-23 13:57:12 +02:00
..
arp_tables.c netfilter: Use kmemdup_array instead of kmemdup for multiple allocation 2024-09-03 10:47:16 +02:00
arpt_mangle.c
arptable_filter.c
ip_tables.c netfilter: nf_dup{4, 6}: Move duplication check to task_struct 2025-05-23 13:57:12 +02:00
ipt_ah.c
ipt_ECN.c
ipt_REJECT.c
ipt_rpfilter.c netfilter: rpfilter: Convert rpfilter_mt() to dscp_t. 2024-11-15 11:00:29 +01:00
ipt_SYNPROXY.c
iptable_filter.c netfilter: use NF_DROP instead of -NF_DROP 2024-05-06 16:29:21 +02:00
iptable_mangle.c netfilter: xt_mangle: only check verdict part of return value 2023-10-18 10:26:43 +02:00
iptable_nat.c netfilter: iptables: Fix null-ptr-deref in iptable_nat_table_init(). 2024-07-31 23:20:50 +02:00
iptable_raw.c netfilter: add missing module descriptions 2023-11-08 13:52:32 +01:00
iptable_security.c
Kconfig netfilter: Make legacy configs user selectable 2024-10-15 10:00:24 +02:00
Makefile netfilter: xtables: allow xtables-nft only builds 2024-01-29 15:43:21 +01:00
nf_defrag_ipv4.c netfilter: add missing module descriptions 2023-11-08 13:52:32 +01:00
nf_dup_ipv4.c netfilter: nf_dup{4, 6}: Move duplication check to task_struct 2025-05-23 13:57:12 +02:00
nf_nat_h323.c netfilter: nat: move repetitive nat port reserve loop to a helper 2022-09-07 16:46:04 +02:00
nf_nat_pptp.c
nf_nat_snmp_basic.asn1 treewide: Add SPDX identifier to IETF ASN.1 modules 2023-10-27 18:04:28 +08:00
nf_nat_snmp_basic_main.c
nf_reject_ipv4.c netfilter: nf_reject: Fix build warning when CONFIG_BRIDGE_NETFILTER=n 2024-09-26 13:03:02 +02:00
nf_socket_ipv4.c tcp: Access &tcp_hashinfo via net. 2022-09-20 10:21:49 -07:00
nf_tproxy_ipv4.c netfilter: tproxy: bail out if IP has been disabled on the device 2024-05-29 00:37:51 +02:00
nft_dup_ipv4.c netfilter: nf_tables: pass context structure to nft_parse_register_load 2024-08-20 12:37:24 +02:00
nft_fib_ipv4.c netfilter: nf_tables: nft_fib: consistent l3mdev handling 2025-05-23 13:57:09 +02:00
nft_reject_ipv4.c