Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Call with group->mark_mutex held, releases it

Proto:static int create_chunk(struct inode *inode, struct audit_tree *tree)

Type:int

Parameter:

TypeParameterName
struct inode *inode
struct audit_tree *tree
404  chunk = alloc_chunk(1)
406  If Not chunk Then
407  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.
408  Return -ENOMEM
411  mark = alloc_mark()
412  If Not mark Then
413  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.
414  kfree(chunk)
415  Return -ENOMEM
418  If fsnotify_add_inode_mark_locked(mark, inode, 0) Then
419  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.
420  fsnotify_put_mark(mark)
421  kfree(chunk)
422  Return -ENOSPC
425  spin_lock( & hash_lock)
426  If goner Then
427  spin_unlock( & hash_lock)
428  Mark mark as detached, remove it from group list
429  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.
430  Free fsnotify mark
431  fsnotify_put_mark(mark)
432  kfree(chunk)
433  Return 0
435  replace_mark_chunk(mark, chunk)
436  index = 1U << 31
437  owner = tree
438  get_tree(tree)
439  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.
440  If Not root Then
441  root = chunk
442  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.
444  key = Function to return search key in our hash from inode.
449  hash_lock & mark->group->mark_mutex is held by caller
450  spin_unlock( & hash_lock)
451  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.
457  fsnotify_put_mark(mark)
458  Return 0
Caller
NameDescribe
tag_chunkhe first tagged inode becomes root of tree