函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ns_mkdir_op

函数原型:static int ns_mkdir_op(struct inode *dir, struct dentry *dentry, umode_t mode)

返回类型:int

参数:

类型参数名称
struct inode *dir
struct dentry *dentry
umode_tmode
1814  label等于gin_current_label_crit_section - current's confining label and update it* Returns: up to date confining label or the ns unconfined label (NOT NULL)* Not safe to call inside locks* The returned reference must be put with end_current_label_crit_section()*
1815  error等于aa_may_manage_policy(label, NULL, AA_MAY_LOAD_POLICY)
1816  d_label_crit_section - put a reference found with begin_current_label..*@label: label reference to put* Should only be used with a reference obtained with* begin_current_label_crit_section and never used in situations where the* task cred may be updated
1817  如果error则返回:error
1820  parent等于aa_get_ns - increment references count on @ns*@ns: namespace to increment reference count of (MAYBE NULL)* Returns: pointer to @ns, if @ns is NULL returns NULL* Requires: @ns must be held with valid refcount when called
1821  AA_BUG(获得目录项的索引节点 != dir)
1826  inode_unlock(dir)
1827  error等于simple_pin_fs( & aafs_ops, & aafs_mnt, & aafs_count)
1828  mutex_lock_nested( & lock, level)
1829  inode_lock_nested(dir, I_MUTEX_PARENT)
1830  如果error则转到:out
1833  error等于__aafs_setup_d_inode - basic inode setup for apparmorfs*@dir: parent directory for the dentry*@dentry: dentry we are seting the inode up for*@mode: permissions the file should have*@data: data to store on inode
1835  如果error则转到:out_pin
1838  ns等于aa_create_ns - create an ns, fail if it already exists*@parent: the parent of the namespace being created*@name: the name of the namespace*@dir: if not null the dir to put the ns entries in* Returns: the a refcounted ns that has been add or an ERR_PTR
1840  如果是错误
1841  error等于错误
1842  ns = NULL
1845  aa_put_ns - decrement refcount on @ns*@ns: namespace to put reference of* Decrement reference count of @ns and if no longer in use free it
1846  out_pin :
1847  如果errorsimple_release_fs( & aafs_mnt, & aafs_count)
1849  out :
1850  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
1851  aa_put_ns - decrement refcount on @ns*@ns: namespace to put reference of* Decrement reference count of @ns and if no longer in use free it
1853  返回:error