Revert "kernel: getname might sleep in kprobe handler (#670)"

This reverts commit 79bb9813ef.
This commit is contained in:
weishu
2023-06-22 12:54:30 +08:00
parent 79bb9813ef
commit 5f1d70dabb
2 changed files with 24 additions and 41 deletions

View File

@@ -52,8 +52,6 @@ static inline bool is_isolated_uid(uid_t uid)
appid <= LAST_APP_ZYGOTE_ISOLATED_UID);
}
static struct group_info root_groups = { .usage = ATOMIC_INIT(2) };
static void setup_groups(struct root_profile *profile, struct cred *cred)
{
if (profile->groups_count > KSU_MAX_GROUPS) {
@@ -62,14 +60,6 @@ static void setup_groups(struct root_profile *profile, struct cred *cred)
return;
}
if (profile->groups_count == 1 && profile->groups[0] == 0) {
// it is root groups, setgroup to root and return early!
if (cred->group_info)
put_group_info(cred->group_info);
cred->group_info = get_group_info(&root_groups);
return;
}
u32 ngroups = profile->groups_count;
struct group_info *group_info = groups_alloc(ngroups);
if (!group_info) {