From 76b11655727a72f2631ae3347978dbd32368cca8 Mon Sep 17 00:00:00 2001 From: tiann Date: Fri, 21 Apr 2023 14:45:44 +0800 Subject: [PATCH] kernel: fix incorrect invalidate for manager in work profile --- kernel/uid_observer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/uid_observer.c b/kernel/uid_observer.c index 2bd148be35ad..90e96b4be862 100644 --- a/kernel/uid_observer.c +++ b/kernel/uid_observer.c @@ -97,7 +97,10 @@ static void do_update_uid(struct work_struct *work) // first, check if manager_uid exist! bool manager_exist = false; list_for_each_entry (np, &uid_list, list) { - if (np->uid == ksu_get_manager_uid()) { + // if manager is installed in work profile, the uid in packages.list is still equals main profile + // don't delete it in this case! + int manager_uid = ksu_get_manager_uid() % 100000; + if (np->uid == manager_uid) { manager_exist = true; break; }