Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\apparmor\apparmorfs.c Create Date:2022-07-28 19:50:04
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:ns_mkdir_op

Proto:static int ns_mkdir_op(struct inode *dir, struct dentry *dentry, umode_t mode)

Type:int

Parameter:

TypeParameterName
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  If error Then Return 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(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. != 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  If error Then Go to 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  If error Then Go to 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  If IS_ERR(ns) Then
1841  error = PTR_ERR(ns)
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  If error Then simple_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  Return error