Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:open_related_ns

Proto:int open_related_ns(struct ns_common *ns, struct ns_common *(*get_ns)(struct ns_common *ns))

Type:int

Parameter:

TypeParameterName
struct ns_common *ns
struct ns_common *(*get_ns
151  struct path path = {}
156  fd = get_unused_fd_flags(O_CLOEXEC)
157  If fd < 0 Then Return fd
160  Do
163  relative = get_ns(ns)
164  If IS_ERR(relative) Then
165  put_unused_fd(fd)
166  Return PTR_ERR(relative)
169  err = __ns_get_path( & path, relative)
170  When err == ERR_PTR( - EAGAIN) cycle
172  If IS_ERR(err) Then
173  put_unused_fd(fd)
174  Return PTR_ERR(err)
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  If IS_ERR(f) Then
180  put_unused_fd(fd)
181  fd = PTR_ERR(f)
182  Else fd_install(fd, f)
185  Return fd
Caller
NameDescribe
ns_ioctl