mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 22:54:01 +00:00
netfilter: nf_tables: GC transaction race with abort path
commit720344340f
upstream. Abort path is missing a synchronization point with GC transactions. Add GC sequence number hence any GC transaction losing race will be discarded. Fixes:5f68718b34
("netfilter: nf_tables: GC transaction API to avoid race with control plane") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
afa584c350
commit
5d319f7a81
1 changed files with 6 additions and 1 deletions
|
@ -9969,7 +9969,12 @@ static int nf_tables_abort(struct net *net, struct sk_buff *skb,
|
|||
enum nfnl_abort_action action)
|
||||
{
|
||||
struct nftables_pernet *nft_net = nft_pernet(net);
|
||||
int ret = __nf_tables_abort(net, action);
|
||||
unsigned int gc_seq;
|
||||
int ret;
|
||||
|
||||
gc_seq = nft_gc_seq_begin(nft_net);
|
||||
ret = __nf_tables_abort(net, action);
|
||||
nft_gc_seq_end(nft_net, gc_seq);
|
||||
|
||||
mutex_unlock(&nft_net->commit_mutex);
|
||||
|
||||
|
|
Loading…
Reference in a new issue