Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:ipc\namespace.c Create Date:2022-07-28 16:53:08
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:create_ipc_ns

Proto:static struct ipc_namespace *create_ipc_ns(struct user_namespace *user_ns, struct ipc_namespace *old_ns)

Type:struct ipc_namespace

Parameter:

TypeParameterName
struct user_namespace *user_ns
struct ipc_namespace *old_ns
39  err = -ENOSPC
40  ucounts = inc_ipc_namespaces(user_ns)
41  If Not ucounts Then Go to fail
44  err = -ENOMEM
45  ns = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
46  If (ns == NULL) Then Go to fail_dec
49  err = ns_alloc_inum( & ns)
50  If err Then Go to fail_free
52  ops = ipcns_operations
54  _set - set a refcount's value*@r: the refcount*@n: value to which the refcount will be set
55  user_ns = get_user_ns(user_ns)
56  ucounts = ucounts
58  err = mq_init_ns(ns)
59  If err Then Go to fail_put
62  sem_init_ns(ns)
63  msg_init_ns(ns)
64  shm_init_ns(ns)
66  Return ns
68  fail_put :
69  put_user_ns(user_ns)
70  ns_free_inum( & ns)
71  fail_free :
72  kfree(ns)
73  fail_dec :
74  dec_ipc_namespaces(ucounts)
75  fail :
76  Return ERR_PTR(err)
Caller
NameDescribe
copy_ipcs