diff options
author | Florian Westphal <fw@strlen.de> | 2018-06-11 13:20:35 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-06-12 19:28:18 +0200 |
commit | 71ad00c50d77e507138c792a9646b53c16f22e11 (patch) | |
tree | c1e02e45c573ae8003390fc95923e48cc70440b0 /net/ipv4/tcp.c | |
parent | netfilter: nft_dynset: do not reject set updates with NFT_SET_EVAL (diff) | |
download | linux-71ad00c50d77e507138c792a9646b53c16f22e11.tar.xz linux-71ad00c50d77e507138c792a9646b53c16f22e11.zip |
netfilter: nf_tables: fix module unload race
We must first remove the nfnetlink protocol handler when nf_tables module
is unloaded -- we don't want userspace to submit new change requests once
we've started to tear down nft state.
Furthermore, nfnetlink must not call any subsystem function after
call_batch returned -EAGAIN.
EAGAIN means the subsys mutex was dropped, so its unlikely but possible that
nf_tables subsystem was removed due to 'rmmod nf_tables' on another cpu.
Therefore, we must abort batch completely and not move on to next part of
the batch.
Last, we can't invoke ->abort unless we've checked that the subsystem is
still registered.
Change netns exit path of nf_tables to make sure any incompleted
transaction gets removed on exit.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/ipv4/tcp.c')
0 files changed, 0 insertions, 0 deletions