Code Review
/
kvmfornfv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
Upgrade to 4.4.50-rt62
[kvmfornfv.git]
/
kernel
/
net
/
core
/
net_namespace.c
diff --git
a/kernel/net/core/net_namespace.c
b/kernel/net/core/net_namespace.c
index
2c2eb1b
..
2e9a1c2
100644
(file)
--- a/
kernel/net/core/net_namespace.c
+++ b/
kernel/net/core/net_namespace.c
@@
-217,6
+217,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);