[PATCH RFC 12/25] net: Move nf_log_net_ops to pernet_sys list

Kirill Tkhai
2017-11-17T18:29:21Z

nf_log_net_ops are registered the same initcall
as netfilter_net_ops, so they has to be moved right
after netfilter_net_ops.

The ops would have had a problem in parallel execution
with others, if init_net had been possible to released.
But it's not, and the rest is safe for that. There is
memory allocation, which nobody else interested in,
and sysctl registration. So, we move it to pernet_sys
list.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
net/netfilter/nf_log.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c
index 8bb152a7cca4..08868afad813 100644
--- a/net/netfilter/nf_log.c
+++ b/net/netfilter/nf_log.c
@@ -582,5 +582,5 @@ static struct pernet_operations nf_log_net_ops = {

int __init netfilter_log_init(void)
{
- return register_pernet_subsys(&nf_log_net_ops);
+ return register_pernet_sys(&nf_log_net_ops);
}