kernel: Fixing the issue of a delay in updating the default profile.

This commit is contained in:
weishu
2023-06-04 09:47:31 +08:00
parent fc77ca989f
commit 990626cf7d

View File

@@ -138,6 +138,7 @@ bool ksu_set_app_profile(struct app_profile *profile, bool persist)
list_add_tail(&p->list, &allow_list); list_add_tail(&p->list, &allow_list);
result = true; result = true;
exit:
// check if the default profiles is changed, cache it to a single struct to accelerate access. // check if the default profiles is changed, cache it to a single struct to accelerate access.
if (unlikely(!strcmp(profile->key, "$"))) { if (unlikely(!strcmp(profile->key, "$"))) {
// set default non root profile // set default non root profile
@@ -150,7 +151,7 @@ bool ksu_set_app_profile(struct app_profile *profile, bool persist)
memcpy(&default_root_profile, &profile->rp_config.profile, memcpy(&default_root_profile, &profile->rp_config.profile,
sizeof(default_root_profile)); sizeof(default_root_profile));
} }
exit:
if (persist) if (persist)
persistent_allow_list(); persistent_allow_list();