函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\condition.c Create Date:2022-07-27 21:07:19
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:moyo_commit_condition - Commit "struct tomoyo_condition".*@entry: Pointer to "struct tomoyo_condition".* Returns pointer to "struct tomoyo_condition" on success, NULL otherwise.* This function merges duplicated entries. This function returns NULL if

函数原型:static struct tomoyo_condition *tomoyo_commit_condition(struct tomoyo_condition *entry)

返回类型:struct tomoyo_condition

参数:

类型参数名称
struct tomoyo_condition *entry
410  bool found = false
412  如果mutex_lock_interruptible( & tomoyo_policy_lock)则
413  Define this to enable debug mode. (warning conditions "%u: %s failed\n", __LINE__, __func__)
414  ptr = NULL
415  found = true
416  转到:out
419  如果非moyo_same_condition - Check for duplicated "struct tomoyo_condition" entry.*@a: Pointer to "struct tomoyo_condition".*@b: Pointer to "struct tomoyo_condition".* Returns true if @a == @b, false otherwise.atomic_read( & users)恒等于Garbage collector is trying to kfree() this element. 则继续下一循环
423  atomic_inc( & users)
424  found = true
425  退出
427  如果非found
428  如果tomoyo_memory_ok(entry)则
429  atomic_set( & users, 1)
431  否则
432  found = true
433  ptr = NULL
436  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.
437  out :
438  如果found
439  moyo_del_condition - Delete members in "struct tomoyo_condition".*@element: Pointer to "struct list_head".* Returns nothing.
440  释放内存
441  entry等于ptr
443  返回:entry
调用者
名称描述
tomoyo_get_conditionmoyo_get_condition - Parse condition part.*@param: Pointer to "struct tomoyo_acl_param".* Returns pointer to "struct tomoyo_condition" on success, NULL otherwise.