Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\nsproxy.c Create Date:2022-07-28 09:31:29
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:This now handles copy for nsproxy and all namespaces therein

Proto:int copy_namespaces(unsigned long flags, struct task_struct *tsk)

Type:int

Parameter:

TypeParameterName
unsigned longflags
struct task_struct *tsk
136  old_ns = Namespaces:
137  user_ns = task_cred_xxx(tsk, user_ns)
140  If Value is more likely to compile time(!(flags & (New mount namespace group | New utsname namespace | New ipc namespace | New pid namespace | New network namespace | New cgroup namespace ))) Then
143  get_nsproxy(old_ns)
144  Return 0
147  If Not ns_capable(user_ns, Allow setting zone reclaim policy ) Then Return -EPERM
157  If (flags & (New ipc namespace | share system V SEM_UNDO semantics )) == (New ipc namespace | share system V SEM_UNDO semantics ) Then Return -EINVAL
161  new_ns = Create new nsproxy and all of its the associated namespaces.* Return the newly created nsproxy. Do not attach this to the task,* leave it to the caller to do proper locking and attach it to task.
162  If IS_ERR(new_ns) Then Return PTR_ERR(new_ns)
165  Namespaces: = new_ns
166  Return 0