From 990626cf7d9d93afba26319d7335234714491212 Mon Sep 17 00:00:00 2001 From: weishu Date: Sun, 4 Jun 2023 09:47:31 +0800 Subject: [PATCH] kernel: Fixing the issue of a delay in updating the default profile. --- kernel/allowlist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/allowlist.c b/kernel/allowlist.c index 30eb1c10..b84a0037 100644 --- a/kernel/allowlist.c +++ b/kernel/allowlist.c @@ -138,6 +138,7 @@ bool ksu_set_app_profile(struct app_profile *profile, bool persist) list_add_tail(&p->list, &allow_list); result = true; +exit: // check if the default profiles is changed, cache it to a single struct to accelerate access. if (unlikely(!strcmp(profile->key, "$"))) { // 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, sizeof(default_root_profile)); } -exit: + if (persist) persistent_allow_list();