]>
git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - ipc/namespace.c
cef1139e6c96f49162cff04e32026257597d6f2d
2 * linux/ipc/namespace.c
3 * Copyright (C) 2006 Pavel Emelyanov <xemul@openvz.org> OpenVZ, SWsoft Inc.
8 #include <linux/ipc_namespace.h>
9 #include <linux/rcupdate.h>
10 #include <linux/nsproxy.h>
11 #include <linux/slab.h>
15 static struct ipc_namespace
*clone_ipc_ns(struct ipc_namespace
*old_ns
)
18 struct ipc_namespace
*ns
;
21 ns
= kmalloc(sizeof(struct ipc_namespace
), GFP_KERNEL
);
25 err
= sem_init_ns(ns
);
28 err
= msg_init_ns(ns
);
31 err
= shm_init_ns(ns
);
48 struct ipc_namespace
*copy_ipcs(unsigned long flags
, struct ipc_namespace
*ns
)
50 struct ipc_namespace
*new_ns
;
55 if (!(flags
& CLONE_NEWIPC
))
58 new_ns
= clone_ipc_ns(ns
);
64 void free_ipc_ns(struct kref
*kref
)
66 struct ipc_namespace
*ns
;
68 ns
= container_of(kref
, struct ipc_namespace
, kref
);