[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4fdc4264-e338-6ee8-a662-7d98b45733a1@virtuozzo.com>
Date: Sun, 5 Nov 2017 19:49:09 +0300
From: Vasily Averin <vvs@...tuozzo.com>
To: netdev@...r.kernel.org
Subject: [PATCH v2 00/21] exit_net checks for objects initialized in net_init
hook
This patch set checks that lists initialized in net_init hooks were
return to initial state at end of net_exit hooks.
I hope such checks allows to detect leaked per-netns objects.
Also I hope that all new pernet_operations will inherit such checks too.
I assume that elements added into per-net lists should not live longer than net namespace,
and should be deleted from the list. I think exit_net hook is good place for such check.
Recently I've found lost list_entry and enabled timer on stop of net namespace.
Then I've reviewed all existing pernet_operations and found that many drivers
have such checks already. So I decided to complete this task and add such checks
into all affected subsystems.
v2:
- net pointer removed from output
- fixed compilation for phonet driver
Vasily Averin (21):
exit_net cleanup: geneve sock_list check
ppp: exit_net cleanup checks added
vxlan: exit_net cleanup checks added
netdev: exit_net cleanup check added
nfs4blocklayout: exit_net cleanup check added
nfs client: exit_net cleanup check added
fib_notifier: exit_net cleanup check added
fib_rules: exit_net cleanup check added
clusterip: exit_net cleanup check added
xfrm6_tunnel: exit_net cleanup check added
af_key: replace BUG_ON on WARN_ON in net_exit hook
l2tp: exit_net cleanup check added
nf_tables: exit_net cleanup check added
nfnetlink_log: exit_net cleanup check added
nfnetlink_gueue: exit_net cleanup check added
x_tables: exit_net cleanup check added
hashlimit: exit_net cleanup check added
recent: exit_net cleanup check added
packet: exit_net cleanup check added
phonet: exit_net cleanup check added
sunrpc: exit_net cleanup check added
drivers/net/geneve.c | 2 ++
drivers/net/ppp/ppp_generic.c | 4 ++++
drivers/net/vxlan.c | 6 ++++++
fs/nfs/blocklayout/rpc_pipefs.c | 2 ++
fs/nfs/client.c | 4 ++++
net/core/dev.c | 3 +++
net/core/fib_notifier.c | 7 +++++++
net/core/fib_rules.c | 7 +++++++
net/ipv4/netfilter/ipt_CLUSTERIP.c | 2 ++
net/ipv6/xfrm6_tunnel.c | 12 ++++++++++++
net/key/af_key.c | 2 +-
net/l2tp/l2tp_core.c | 6 ++++++
net/netfilter/nf_tables_api.c | 9 +++++++++
net/netfilter/nfnetlink_log.c | 6 ++++++
net/netfilter/nfnetlink_queue.c | 7 +++++++
net/netfilter/x_tables.c | 10 ++++++++++
net/netfilter/xt_hashlimit.c | 4 ++++
net/netfilter/xt_recent.c | 4 ++++
net/packet/af_packet.c | 2 ++
net/phonet/pn_dev.c | 4 ++++
net/sunrpc/sunrpc_syms.c | 4 ++++
21 files changed, 106 insertions(+), 1 deletion(-)
--
2.7.4
Powered by blists - more mailing lists