OSDN Git Service

netfilter: nf_tables: don't write table validation state without mutex
authorFlorian Westphal <fw@strlen.de>
Thu, 13 Apr 2023 15:13:19 +0000 (17:13 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 21 Apr 2023 23:39:40 +0000 (01:39 +0200)
commit9a32e9850686599ed194ccdceb6cd3dd56b2d9b9
tree0e183ca0e7bb58bd842d56ba9b1aeaa5c785cc75
parent63e9bbbcca60333490e13744ae736d8f988e4950
netfilter: nf_tables: don't write table validation state without mutex

The ->cleanup callback needs to be removed, this doesn't work anymore as
the transaction mutex is already released in the ->abort function.

Just do it after a successful validation pass, this either happens
from commit or abort phases where transaction mutex is held.

Fixes: f102d66b335a ("netfilter: nf_tables: use dedicated mutex to guard transactions")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/linux/netfilter/nfnetlink.h
net/netfilter/nf_tables_api.c
net/netfilter/nfnetlink.c