aboutsummaryrefslogtreecommitdiff
path: root/ipc/namespace.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/namespace.c')
-rw-r--r--ipc/namespace.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ipc/namespace.c b/ipc/namespace.c
index 1b967655eb3..fe3c97aa99d 100644
--- a/ipc/namespace.c
+++ b/ipc/namespace.c
@@ -20,6 +20,8 @@ static struct ipc_namespace *clone_ipc_ns(struct ipc_namespace *old_ns)
if (ns == NULL)
return ERR_PTR(-ENOMEM);
+ atomic_inc(&nr_ipc_ns);
+
sem_init_ns(ns);
msg_init_ns(ns);
shm_init_ns(ns);
@@ -83,4 +85,5 @@ void free_ipc_ns(struct kref *kref)
msg_exit_ns(ns);
shm_exit_ns(ns);
kfree(ns);
+ atomic_dec(&nr_ipc_ns);
}