函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:open_related_ns

函数原型:int open_related_ns(struct ns_common *ns, struct ns_common *(*get_ns)(struct ns_common *ns))

返回类型:int

参数:

类型参数名称
struct ns_common *ns
struct ns_common *(*get_ns
151  struct path path = {}
156  fd等于get_unused_fd_flags(O_CLOEXEC)
157  如果fd小于0则返回:fd
160  循环
163  relative等于get_ns(ns)
164  如果是错误
165  put_unused_fd(fd)
166  返回:错误
169  err等于__ns_get_path( & path, relative)
170 err恒等于错误号循环
172  如果是错误
173  put_unused_fd(fd)
174  返回:错误
177  f等于dentry_open( & path, O_RDONLY, current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.())
178  path_put - put a reference to a path*@path: path to put the reference to* Given a path decrement the reference count to the dentry and the vfsmount.
179  如果是错误
180  put_unused_fd(fd)
181  fd等于错误
182  否则fd_install(fd, f)
185  返回:fd
调用者
名称描述
ns_ioctl