diff options
author | WANG Cong <[email protected]> | 2016-11-16 10:27:02 -0800 |
---|---|---|
committer | David S. Miller <[email protected]> | 2016-11-17 11:19:40 -0500 |
commit | cfc44a4d147ea605d66ccb917cc24467d15ff867 (patch) | |
tree | 2a4391a568f5771140397b40c422b02568726810 /tools/perf/scripts/python/netdev-times.py | |
parent | e5f6f564fd191d365fcd775c06a732a488205588 (diff) |
net: check dead netns for peernet2id_alloc()
Andrei reports we still allocate netns ID from idr after we destroy
it in cleanup_net().
cleanup_net():
...
idr_destroy(&net->netns_ids);
...
list_for_each_entry_reverse(ops, &pernet_list, list)
ops_exit_list(ops, &net_exit_list);
-> rollback_registered_many()
-> rtmsg_ifinfo_build_skb()
-> rtnl_fill_ifinfo()
-> peernet2id_alloc()
After that point we should not even access net->netns_ids, we
should check the death of the current netns as early as we can in
peernet2id_alloc().
For net-next we can consider to avoid sending rtmsg totally,
it is a good optimization for netns teardown path.
Fixes: 0c7aecd4bde4 ("netns: add rtnl cmd to add and get peer netns ids")
Reported-by: Andrei Vagin <[email protected]>
Cc: Nicolas Dichtel <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Acked-by: Andrei Vagin <[email protected]>
Signed-off-by: Nicolas Dichtel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/netdev-times.py')
0 files changed, 0 insertions, 0 deletions