Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: use net->count to check whether a netns is alive or not
[ Upstream commit 91864f5 ] The previous idea was to check whether a net namespace is in net_exit_list or not. It doesn't work, because net->exit_list is used in __register_pernet_operations and __unregister_pernet_operations where all namespaces are added to a temporary list to make cleanup in a error case, so list_empty(&net->exit_list) always returns false. Reported-by: Mantas Mikulėnas <[email protected]> Fixes: 002d8a1 ("net: skip genenerating uevents for network namespaces that are exiting") Signed-off-by: Andrei Vagin <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
- Loading branch information