aboutsummaryrefslogtreecommitdiff
path: root/net/sched/sch_codel.c
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2024-08-20 09:54:30 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2024-08-20 12:26:22 +0200
commit1eacdd71b3436b54d5fc8218c4bb0187d92a6892 (patch)
treeb4e66c5b219f5929c393db44745aa9387e44d737 /net/sched/sch_codel.c
parent807067bf014d4a3ae2cc55bd3de16f22a01eb580 (diff)
netfilter: nft_counter: Disable BH in nft_counter_offload_stats().
The sequence counter nft_counter_seq is a per-CPU counter. There is no lock associated with it. nft_counter_do_eval() is using the same counter and disables BH which suggest that it can be invoked from a softirq. This in turn means that nft_counter_offload_stats(), which disables only preemption, can be interrupted by nft_counter_do_eval() leading to two writer for one seqcount_t. This can lead to loosing stats or reading statistics while they are updated. Disable BH during stats update in nft_counter_offload_stats() to ensure one writer at a time. Fixes: b72920f6e4a9d ("netfilter: nftables: counter hardware offload support") Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Reviewed-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/sched/sch_codel.c')
0 files changed, 0 insertions, 0 deletions