Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\audit_tree.c Create Date:2022-07-28 11:30:26
Last Modify:2022-05-22 16:43:11 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:he first tagged inode becomes root of tree

Proto:static int tag_chunk(struct inode *inode, struct audit_tree *tree)

Type:int

Parameter:

TypeParameterName
struct inode *inode
struct audit_tree *tree
469  mutex_lock( & protect marks_list )
470  mark = Given a list of marks, find the mark associated with given group. If found* take a reference to that mark and return it, else return NULL.
471  If Not mark Then Return Call with group->mark_mutex held, releases it
480  spin_lock( & hash_lock)
481  old = mark_chunk(mark)
482  When n < count cycle
483  If owner == tree Then
487  Return 0
490  spin_unlock( & hash_lock)
492  chunk = alloc_chunk(count + 1)
493  If Not chunk Then
494  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.
495  fsnotify_put_mark(mark)
496  Return -ENOMEM
499  spin_lock( & hash_lock)
500  If goner Then
501  spin_unlock( & hash_lock)
502  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.
503  fsnotify_put_mark(mark)
504  kfree(chunk)
505  Return 0
507  p = owners[count - 1]
508  index; upper bit indicates 'will prune' = count - 1 | 1U << 31
509  owner = tree
510  get_tree(tree)
511  list_add - add a new entry*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head.* This is good for implementing stacks.
512  If Not root Then
513  root = chunk
514  list_add - add a new entry*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head.* This is good for implementing stacks.
520  replace_chunk(chunk, old)
521  spin_unlock( & hash_lock)
522  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.
523  fsnotify_put_mark(mark)
524  Drop reference to the chunk that was held by the mark. This is the reference* that gets dropped after we've removed the chunk from the hash table and we* use it to make sure chunk cannot be freed before RCU grace period expires.
526  Return 0
Caller
NameDescribe
tag_mount