]> www.infradead.org Git - users/dwmw2/linux.git/commit
netfilter: nft_flow_offload: update tcp state flags under lock
authorFlorian Westphal <fw@strlen.de>
Mon, 13 Jan 2025 23:50:34 +0000 (00:50 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 19 Jan 2025 15:41:54 +0000 (16:41 +0100)
commit7a4b61406395291ffb7220a10e8951a9a8684819
treedc79c4c075ea308efd13f02b3c00e3409bd4d783
parentd9d7b489416d18ba696c32a93623ecb0176b374e
netfilter: nft_flow_offload: update tcp state flags under lock

The conntrack entry is already public, there is a small chance that another
CPU is handling a packet in reply direction and racing with the tcp state
update.

Move this under ct spinlock.

This is done once, when ct is about to be offloaded, so this should
not result in a noticeable performance hit.

Fixes: 8437a6209f76 ("netfilter: nft_flow_offload: set liberal tracking mode for tcp")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_flow_offload.c