函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\fork.c Create Date:2022-07-27 09:58:33
Last Modify:2020-03-17 11:04:53 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Helper to unshare the files of the current task.* We don't want to expose copy_files internals to* the exec layer of the kernel.

函数原型:int unshare_files(struct files_struct **displaced)

返回类型:int

参数:

类型参数名称
struct files_struct **displaced
3024  task等于当前进程
3025  struct files_struct * copy = NULL
3028  error等于Unshare file descriptor table if it is being shared
3029  如果error或非copy
3030  * displaced = NULL
3031  返回:error
3033  displaced等于打开文件信息
3034  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.
3035  打开文件信息等于copy
3036  task_unlock(task)
3037  返回:0
调用者
名称描述
do_coredump
__do_execve_filesys_execve() executes a new program.