Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:SYSCALL_DEFINE2

Proto:SYSCALL_DEFINE2(setns, int, fd, int, nstype)

Type:

Parameter:Nothing

235  tsk = current process
241  file = proc_ns_fget(fd)
242  If IS_ERR(file) Then Return PTR_ERR(file)
245  err = -EINVAL
246  ns = get_proc_ns(file_inode(file))
247  If nstype && type != nstype Then Go to out
250  new_nsproxy = 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.
251  If IS_ERR(new_nsproxy) Then
252  err = PTR_ERR(new_nsproxy)
253  Go to out
256  err = install(new_nsproxy, ns)
257  If err Then
258  free_nsproxy(new_nsproxy)
259  Go to out
261  switch_task_namespaces(tsk, new_nsproxy)
263  perf_event_namespaces(tsk)
264  out :
265  fput(file)
266  Return err