Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Requires: @ns->lock held

Proto:int __aafs_ns_mkdir(struct aa_ns *ns, struct dentry *parent, const char *name, struct dentry *dent)

Type:int

Parameter:

TypeParameterName
struct aa_ns *ns
struct dentry *parent
const char *name
struct dentry *dent
2034  AA_BUG(!ns)
2035  AA_BUG(!parent)
2036  AA_BUG(!mutex_is_locked( & lock))
2038  If Not name Then name = name
2041  If Not dent Then
2043  dent = aafs_create_dir - create a directory in the apparmorfs filesystem*@name: name of dentry to create*@parent: parent directory for this dentry* see aafs_create
2044  If IS_ERR(dent) Then Go to fail
2046  Else get a reference to a dentry
2048  ns_dir(ns) = dir = dent
2049  error = assumes cleanup in caller
2050  If error Then Go to fail2
2055  error = Requires: @profile->ns->lock held
2056  If error Then Go to fail2
2062  mutex_lock_nested( & lock, level)
2063  error = Requires: @ns->lock held
2064  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.
2065  If error Then Go to fail2
2069  Return 0
2071  fail :
2072  error = PTR_ERR(dent)
2074  fail2 :
2075  Requires: @ns->lock held
2077  Return error
Caller
NameDescribe
__aafs_ns_mkdirRequires: @ns->lock held
aa_create_aafsaa_create_aafs - create the apparmor security filesystem* dentries created here are released by aa_destroy_aafs* Returns: error on failure
__aa_create_ns