函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\audit_tree.c Create Date:2022-07-27 12:33:51
Last Modify:2022-05-22 16:43:11 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:he first tagged inode becomes root of tree

函数原型:static int tag_chunk(struct inode *inode, struct audit_tree *tree)

返回类型:int

参数:

类型参数名称
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  如果非mark则返回:Call with group->mark_mutex held, releases it
480  加自旋锁
481  old等于mark_chunk(mark)
482 n小于count循环
483  如果owner恒等于tree
487  返回:0
490  自旋锁解锁
492  chunk等于alloc_chunk(count + 1)
493  如果非chunk
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  返回:负ENOMEM
499  加自旋锁
500  如果goner
501  自旋锁解锁
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  返回: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  添加链表项
512  如果非root
513  root等于chunk
514  添加链表项
520  replace_chunk(chunk, old)
521  自旋锁解锁
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  返回:0
调用者
名称描述
tag_mount