函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\nsproxy.c Create Date:2022-07-27 10:32:09
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:switch_task_namespaces

函数原型:void switch_task_namespaces(struct task_struct *p, struct nsproxy *new)

返回类型:void

参数:

类型参数名称
struct task_struct *p
struct nsproxy *new
217  might_sleep()
219  Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring* subscriptions and synchronises with wait4(). Also used in procfs. Also* pins the final release of task.io_context. Also protects ->cpuset and* ->cgroup.subsys[]. And ->vfork_done.
220  ns等于命名空间代理
221  命名空间代理等于new
222  task_unlock(p)
224  如果nsatomic_dec_and_test( & 代理记录数)则free_nsproxy(ns)
调用者
名称描述
exit_task_namespaces
SYSCALL_DEFINE2
ksys_unshareshare allows a process to 'unshare' part of the process* context which was originally shared using clone. copy_** functions used by do_fork() cannot be used here directly* because they modify an inactive task_struct that is being* constructed