diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-11-23 10:23:09 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-11-23 10:23:09 +0100 |
commit | ec84f0056711efe93f034c86dd65e0de8d3531ff (patch) | |
tree | 3e50d385d645487924bcac1f5fb33b496cda6dc0 /net/core/net_namespace.c | |
parent | d03266910a533d874c01ef2ca8dc73009f2925fa (diff) | |
parent | 23400ac997062647f2b63c82030d189671b1effe (diff) |
Merge branch 'linus' into sched/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/core/net_namespace.c')
-rw-r--r-- | net/core/net_namespace.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index f61c0e02a413..7001da910c6b 100644 --- a/net/core/net_namespace.c +++ b/net/core/net_namespace.c @@ -219,6 +219,8 @@ int peernet2id_alloc(struct net *net, struct net *peer) bool alloc; int id; + if (atomic_read(&net->count) == 0) + return NETNSA_NSID_NOT_ASSIGNED; spin_lock_irqsave(&net->nsid_lock, flags); alloc = atomic_read(&peer->count) == 0 ? false : true; id = __peernet2id_alloc(net, peer, &alloc); |