Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\condition.c Create Date:2022-07-28 19:38:13
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:static struct tomoyo_condition *tomoyo_commit_condition(struct tomoyo_condition *entry)

Type:struct tomoyo_condition

Parameter:

TypeParameterName
struct tomoyo_condition *entry
410  bool found = false
412  If mutex_lock_interruptible( & tomoyo_policy_lock) Then
413  Define this to enable debug mode. (warning conditions "%u: %s failed\n", __LINE__, __func__)
414  ptr = NULL
415  found = true
416  Go to out
419  If Not 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. Then Continue
423  atomic_inc( & users)
424  found = true
425  Break
427  If Not found Then
428  If tomoyo_memory_ok(entry) Then
429  atomic_set( & users, 1)
431  Else
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  If found Then
439  moyo_del_condition - Delete members in "struct tomoyo_condition".*@element: Pointer to "struct list_head".* Returns nothing.
440  kfree(entry)
441  entry = ptr
443  Return entry
Caller
NameDescribe
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.