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:__label_replace - replace @old with @new in label set*@old: label to remove from label set*@new: label to replace @old with* Requires: labels_set(@old)->lock write_lock* valid ref count be held on @new* Returns: true if @old was in set and replaced by

Proto:static bool __label_replace(struct aa_label *old, struct aa_label *new)

Type:bool

Parameter:

TypeParameterName
struct aa_label *old
struct aa_label *new
601  ls = labels_set(old)
603  AA_BUG(!ls)
604  AA_BUG(!old)
605  AA_BUG(!new)
606  lockdep_assert_held_write( & lock)
607  AA_BUG(flags & label is in tree )
609  If Not label_is_stale(old) Then __label_make_stale(old)
612  If flags & label is in tree Then
613  rb_replace_node( & node, & node, & root)
614  flags &= ~ label is in tree
615  flags |= label is in tree
616  Return true
619  Return false
Caller
NameDescribe
__label_insert__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
aa_label_replaceaa_label_replace - replace a label @old with a new version @new*@old: label to replace*@new: label replacing @old* Returns: true if @old was in tree and replaced* else @old was not in tree, and @new was not inserted