函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:ipc\mqueue.c Create Date:2022-07-27 18:26:24
Last Modify:2020-03-17 23:00:47 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:do_mq_open

函数原型:static int do_mq_open(const char __user *u_name, int oflag, umode_t mode, struct mq_attr *attr)

返回类型:int

参数:

类型参数名称
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  如果是错误则返回:错误
813  fd等于get_unused_fd_flags(O_CLOEXEC)
814  如果fd小于0则转到:out_putname
817  ro等于mnt_want_write(mnt)
818  inode_lock(获得目录项的索引节点)
819  dentry等于lookup_one_len( pointer to actual string , root, strlen - Find the length of a string*@s: The string to be sized)
820  如果是错误
821  error等于错误
822  转到:out_putfd
824  mnt等于mntget(mnt)
825  error等于prepare_open(dentry, oflag, ro, mode, name, attr)
826  如果非error
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  如果非是错误fd_install(fd, file)
830  否则error等于错误
833  path_put( & path)
834  out_putfd :
835  如果error
836  put_unused_fd(fd)
837  fd等于error
839  inode_unlock(获得目录项的索引节点)
840  如果非romnt_drop_write(mnt)
842  out_putname :
843  putname(name)
844  返回:fd
调用者
名称描述
SYSCALL_DEFINE4
COMPAT_SYSCALL_DEFINE4