]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 09:35:45 +0000 (11:35 +0200)
commit9de070954ed13f3e6ba421187f55ae220a9c3e46
tree450d2be8b10909a01a5342c50172b81a2b0228fb
parent686a8fefe7abb447f9201443dd73ac79696adad3
netfilter: nf_tables: don't write table validation state without mutex

[ Upstream commit 9a32e9850686599ed194ccdceb6cd3dd56b2d9b9 ]

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: 6dc5aec035e7 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/netfilter/nfnetlink.h
net/netfilter/nf_tables_api.c
net/netfilter/nfnetlink.c