Skip to content
Commit 91864f58 authored by Andrey Vagin's avatar Andrey Vagin Committed by David S. Miller
Browse files

net: use net->count to check whether a netns is alive or not



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: default avatarMantas Mikulėnas <grawity@gmail.com>
Fixes: 002d8a1a ("net: skip genenerating uevents for network namespaces that are exiting")
Signed-off-by: default avatarAndrei Vagin <avagin@openvz.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a13b2082
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment