Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:aa_label_insert - insert label @label into @ls or return existing label*@ls - labelset to insert @label into*@label - label to insert* Requires: caller to hold a valid ref on @label* Returns: ref counted @label if successful in inserting @label* else ref

Proto:struct aa_label *aa_label_insert(struct aa_labelset *ls, struct aa_label *label)

Type:struct aa_label

Parameter:

TypeParameterName
struct aa_labelset *ls
struct aa_label *label
903  AA_BUG(!ls)
904  AA_BUG(!label)
907  If Not label_is_stale(label) Then
908  read_lock_irqsave( & lock, flags)
909  l = __label_find - find label @label in label set*@label: label to find (NOT NULL)* Requires: labels_set(@label)->lock held* caller to hold a valid ref on l* Returns: ref counted @label if @label is in tree OR* ref counted label that is equiv to @label in
910  read_unlock_irqrestore( & lock, flags)
911  If l Then Return l
915  write_lock_irqsave( & lock, flags)
916  l = __label_insert - attempt to insert @l into a label set*@ls: set of labels to insert @l into (NOT NULL)*@label: new label to insert (NOT NULL)*@replace: whether insertion should replace existing entry that is not stale* Requires: @ls->lock* caller to hold
917  write_unlock_irqrestore( & lock, flags)
919  Return l
Caller
NameDescribe
__label_update__label_update - insert updated version of @label into labelset*@label - the label to update/replace* Returns: new label that is up to date* else NULL on failure* Requires: @ns lock be held* Note: worst case is the stale @label does not get updated and has