]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
netfilter: nf_tables: GC transaction race with netns dismantle
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 15 Aug 2023 13:39:01 +0000 (15:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Aug 2023 15:32:46 +0000 (17:32 +0200)
commitc26cc57f41c655b2037520472ef2e92645bf16eb
tree42cfbb48b231d7285259683de930ac417062dcec
parent3bdf400a1ad166274e85fa537f8a993a4553e36d
netfilter: nf_tables: GC transaction race with netns dismantle

[ Upstream commit 02c6c24402bf1c1e986899c14ba22a10b510916b ]

Use maybe_get_net() since GC workqueue might race with netns exit path.

Fixes: 5f68718b34a5 ("netfilter: nf_tables: GC transaction API to avoid race with control plane")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nf_tables_api.c