函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\apparmor\apparmorfs.c Create Date:2022-07-27 21:25:05
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:aa_mk_null_file

函数原型:static int aa_mk_null_file(struct dentry *parent)

返回类型:int

参数:

类型参数名称
struct dentry *parent
2528  struct vfsmount * mount = NULL
2531  count等于0
2532  error等于simple_pin_fs(s_type, & mount, & count)
2534  如果error则返回:error
2537  inode_lock(获得目录项的索引节点)
2538  dentry等于lookup_one_len(NULL_FILE_NAME, parent, strlen - Find the length of a string*@s: The string to be sized)
2539  如果是错误
2540  error等于错误
2541  转到:out
2543  inode等于取新的索引节点
2544  如果非inode
2545  error等于负ENOMEM
2546  转到:out1
2549  Stat data, not accessed from path walking 等于get_next_ino()
2550  i_mode等于S_IFCHR按位或S_IRUGO按位或S_IWUGO
2551  i_atime等于i_mtime等于i_ctime等于current_time(inode)
2552  init_special_inode(inode, S_IFCHR | S_IRUGO | S_IWUGO, MKDEV(MEM_MAJOR, 3))
2554  为目录项建立索引
2555  dentry等于获得目录项引用
2556  mnt等于mntget(mount)
2558  error等于0
2560  out1 :
2561  dput(dentry)
2562  out :
2563  inode_unlock(获得目录项的索引节点)
2564  simple_release_fs( & mount, & count)
2565  返回:error
调用者
名称描述
aa_create_aafsaa_create_aafs - create the apparmor security filesystem* dentries created here are released by aa_destroy_aafs* Returns: error on failure