]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nfnetlink: use net_generic infra
authorFlorian Westphal <fw@strlen.de>
Thu, 1 Apr 2021 14:11:05 +0000 (16:11 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 5 Apr 2021 22:34:51 +0000 (00:34 +0200)
commite54f8cd31eb486e86859e43098c838f528fe4f9b
treef437111ce057dae4d8e06642b72ec3097717806b
parenta16e05e39521f7b60138e0d5c08fedae5c7776b2
netfilter: nfnetlink: use net_generic infra

No need to place it in struct net, nfnetlink is a module and usage
doesn't occur in fastpath.

Also remove rcu usage:

Not a single reader of net->nfnl uses rcu accessors.

When exit_batch callbacks are executed the net namespace is already dead
so no calls to these functions are possible anymore (else we'd get NULL
deref crash too).

If the module is removed, then modules that call any of those functions
have been removed too so no calls to nfnl functions are possible either.

The nfnl and nfl_stash pointers in struct net are no longer used, they
will be removed in a followup patch to minimize changes to struct net
(causes rebuild for entire network stack).

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nfnetlink.c