Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:audit_tag_tree

Proto:int audit_tag_tree(char *old, char *new)

Type:int

Parameter:

TypeParameterName
char *old
char *new
877  failed = 0
882  err = kern_path(new, 0, & path2)
883  If err Then Return err
885  tagged = collect_mounts( & path2)
886  path_put( & path2)
887  If IS_ERR(tagged) Then Return PTR_ERR(tagged)
890  err = kern_path(old, 0, & path1)
891  If err Then
892  drop_collected_mounts(tagged)
893  Return err
896  mutex_lock( & audit_filter_mutex)
897  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.
898  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.
900  When next != tree_list cycle
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.(next, structaudit_tree, list)
905  get_tree(tree)
906  deletes entry from list
907  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.
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  If Not err Then
913  path_put( & path2)
916  If Not good_one Then
917  put_tree(tree)
919  Continue
922  failed = iterate_mounts(tag_mount, tree, tagged)
923  If failed Then
924  put_tree(tree)
926  Break
929  mutex_lock( & audit_filter_mutex)
930  spin_lock( & hash_lock)
931  If Not goner Then
935  spin_unlock( & hash_lock)
936  put_tree(tree)
939  When prev != tree_list cycle
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.(prev, structaudit_tree, list)
943  get_tree(tree)
944  deletes entry from list
945  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.
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  If Not failed Then
950  spin_lock( & hash_lock)
954  Else
958  put_tree(tree)
959  mutex_lock( & audit_filter_mutex)
961  deletes entry from list
962  deletes entry from list
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  Return failed
Caller
NameDescribe
audit_receive_msg