]>
git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - ipc/namespace.c
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
)
17 struct ipc_namespace
*ns
;
19 ns
= kmalloc(sizeof(struct ipc_namespace
), GFP_KERNEL
);
21 return ERR_PTR(-ENOMEM
);
31 struct ipc_namespace
*copy_ipcs(unsigned long flags
, struct ipc_namespace
*ns
)
33 struct ipc_namespace
*new_ns
;
38 if (!(flags
& CLONE_NEWIPC
))
41 new_ns
= clone_ipc_ns(ns
);
47 void free_ipc_ns(struct kref
*kref
)
49 struct ipc_namespace
*ns
;
51 ns
= container_of(kref
, struct ipc_namespace
, kref
);