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 /LICENSES | |
parent | 215a31f19dedd4e92a67cf5a9717ee898d012b3a (diff) | |
download | linux-stable-71ad00c50d77e507138c792a9646b53c16f22e11.tar.gz linux-stable-71ad00c50d77e507138c792a9646b53c16f22e11.tar.bz2 linux-stable-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 'LICENSES')
0 files changed, 0 insertions, 0 deletions