OSDN Git Service

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)
commit1be05ea766d763c52b99edf258dfe8bd1d054697
treef437111ce057dae4d8e06642b72ec3097717806b
parent237c609f8744a8d5415f40a7ee731957934b0eef
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