Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:ipc\mqueue.c Create Date:2022-07-28 16:51:12
Last Modify:2020-03-17 23:00:47 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:do_mq_open

Proto:static int do_mq_open(const char __user *u_name, int oflag, umode_t mode, struct mq_attr *attr)

Type:int

Parameter:

TypeParameterName
const char __user *u_name
intoflag
umode_tmode
struct mq_attr *attr
801  mnt = mq_mnt
802  root = root of the mounted tree
808  audit_mq_open(oflag, mode, attr)
810  If IS_ERR(name = getname(u_name)) Then Return PTR_ERR(name)
813  fd = get_unused_fd_flags(O_CLOEXEC)
814  If fd < 0 Then Go to out_putname
817  ro = mnt_want_write(mnt)
818  inode_lock(d_inode - Get the actual inode of this dentry*@dentry: The dentry to query* This is the helper normal filesystems should use to get at their own inodes* in their own dentries and ignore the layering superimposed upon them.)
819  dentry = lookup_one_len( pointer to actual string , root, strlen - Find the length of a string*@s: The string to be sized)
820  If IS_ERR(dentry) Then
821  error = PTR_ERR(dentry)
822  Go to out_putfd
824  mnt = mntget(mnt)
825  error = prepare_open(dentry, oflag, ro, mode, name, attr)
826  If Not error Then
827  file = dentry_open( & path, oflag, 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.())
828  If Not IS_ERR(file) Then fd_install(fd, file)
830  Else error = PTR_ERR(file)
833  path_put( & path)
834  out_putfd :
835  If error Then
836  put_unused_fd(fd)
837  fd = error
839  inode_unlock(d_inode - Get the actual inode of this dentry*@dentry: The dentry to query* This is the helper normal filesystems should use to get at their own inodes* in their own dentries and ignore the layering superimposed upon them.)
840  If Not ro Then mnt_drop_write(mnt)
842  out_putname :
843  putname(name)
844  Return fd
Caller
NameDescribe
SYSCALL_DEFINE4
COMPAT_SYSCALL_DEFINE4