Lines Matching refs:new
717 if (ent->new == profile) in __list_lookup_parent()
719 if (strncmp(ent->new->base.hname, profile->base.hname, len) == in __list_lookup_parent()
720 0 && ent->new->base.hname[len] == 0) in __list_lookup_parent()
721 return ent->new; in __list_lookup_parent()
740 static void __replace_profile(struct aa_profile *old, struct aa_profile *new) in __replace_profile() argument
752 p = __find_child(&new->base.profiles, child->base.name); in __replace_profile()
763 rcu_assign_pointer(child->parent, aa_get_profile(new)); in __replace_profile()
764 list_add_rcu(&child->base.list, &new->base.profiles); in __replace_profile()
769 if (!rcu_access_pointer(new->parent)) { in __replace_profile()
771 rcu_assign_pointer(new->parent, aa_get_profile(parent)); in __replace_profile()
773 aa_label_replace(&old->label, &new->label); in __replace_profile()
775 __aafs_profile_migrate_dents(old, new); in __replace_profile()
777 if (list_empty(&new->base.list)) { in __replace_profile()
779 list_replace_rcu(&old->base.list, &new->base.list); in __replace_profile()
780 aa_get_profile(new); in __replace_profile()
812 static void share_name(struct aa_profile *old, struct aa_profile *new) in share_name() argument
814 aa_put_str(new->base.hname); in share_name()
816 new->base.hname = old->base.hname; in share_name()
817 new->base.name = old->base.name; in share_name()
818 new->label.hname = old->label.hname; in share_name()
824 static struct aa_profile *update_to_newest_parent(struct aa_profile *new) in update_to_newest_parent() argument
828 parent = rcu_dereference_protected(new->parent, in update_to_newest_parent()
829 mutex_is_locked(&new->ns->lock)); in update_to_newest_parent()
835 rcu_assign_pointer(new->parent, newest); in update_to_newest_parent()
931 ent->new->rawdata = aa_get_loaddata(udata); in aa_replace_profiles()
932 error = __lookup_replace(ns, ent->new->base.hname, in aa_replace_profiles()
938 if (ent->new->rename) { in aa_replace_profiles()
939 error = __lookup_replace(ns, ent->new->rename, in aa_replace_profiles()
947 ent->new->ns = aa_get_ns(ns); in aa_replace_profiles()
953 policy = __lookup_parent(ns, ent->new->base.hname); in aa_replace_profiles()
956 p = __list_lookup_parent(&lh, ent->new); in aa_replace_profiles()
962 rcu_assign_pointer(ent->new->parent, aa_get_profile(p)); in aa_replace_profiles()
966 rcu_assign_pointer(ent->new->parent, aa_get_profile(p)); in aa_replace_profiles()
982 if (rcu_access_pointer(ent->new->parent)) { in aa_replace_profiles()
984 p = aa_deref_parent(ent->new); in aa_replace_profiles()
987 parent = ns_subprofs_dir(ent->new->ns); in aa_replace_profiles()
988 error = __aafs_profile_mkdir(ent->new, parent); in aa_replace_profiles()
1004 if (ent->old && ent->old->rawdata == ent->new->rawdata) { in aa_replace_profiles()
1006 audit_policy(label, op, ns_name, ent->new->base.hname, in aa_replace_profiles()
1010 aa_put_proxy(ent->new->label.proxy); in aa_replace_profiles()
1011 ent->new->label.proxy = NULL; in aa_replace_profiles()
1019 audit_policy(label, op, ns_name, ent->new->base.hname, NULL, in aa_replace_profiles()
1023 share_name(ent->old, ent->new); in aa_replace_profiles()
1024 __replace_profile(ent->old, ent->new); in aa_replace_profiles()
1028 if (rcu_access_pointer(ent->new->parent)) { in aa_replace_profiles()
1031 parent = update_to_newest_parent(ent->new); in aa_replace_profiles()
1035 __add_profile(lh, ent->new); in aa_replace_profiles()
1057 audit_policy(label, op, ns_name, ent ? ent->new->base.hname : NULL, in aa_replace_profiles()
1068 audit_policy(label, op, ns_name, tmp->new->base.hname, info, in aa_replace_profiles()