函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:audit_tag_tree

函数原型:int audit_tag_tree(char *old, char *new)

返回类型:int

参数:

类型参数名称
char *old
char *new
877  failed等于0
882  err等于kern_path(new, 0, & path2)
883  如果err则返回:err
885  tagged等于collect_mounts( & path2)
886  path_put( & path2)
887  如果是错误则返回:错误
890  err等于kern_path(old, 0, & path1)
891  如果err
892  drop_collected_mounts(tagged)
893  返回:err
896  mutex_lock( & audit_filter_mutex)
897  添加链表项
898  添加链表项
900 链表后项不等于tree_list循环
902  good_one等于0
904  tree等于container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(链表后项, structaudit_tree, list)
905  get_tree(tree)
906  删除链表项
907  添加链表项
908  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.
910  err等于kern_path(pathname, 0, & path2)
911  如果非err
912  good_one等于path_is_under( & path1, & path2)
913  path_put( & path2)
916  如果非good_one
917  put_tree(tree)
919  继续下一循环
922  failed等于iterate_mounts(tag_mount, tree, tagged)
923  如果failed
924  put_tree(tree)
926  退出
929  mutex_lock( & audit_filter_mutex)
930  加自旋锁
931  如果非goner
935  自旋锁解锁
936  put_tree(tree)
939 链表前项不等于tree_list循环
942  tree等于container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(链表前项, structaudit_tree, list)
943  get_tree(tree)
944  删除链表项
945  添加链表项
946  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.
948  如果非failed
950  加自旋锁
952  index; upper bit indicates 'will prune' 与等于1U左移31位的值的反
954  否则
958  put_tree(tree)
959  mutex_lock( & audit_filter_mutex)
961  删除链表项
962  删除链表项
963  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.
964  path_put( & path1)
965  drop_collected_mounts(tagged)
966  返回:failed
调用者
名称描述
audit_receive_msg