Skip to content

Commit 9427bfd

Browse files
ShirkNekoaaaaaaaa-815
authored andcommitted
Kernel: Add support for 6.12
Filtered from tiann/KernelSU tiann#2793 Co-authored-by: libingxuan <[email protected]>
1 parent e8d80d8 commit 9427bfd

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

kernel/core_hook.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,11 @@ static inline bool is_unsupported_uid(uid_t uid)
169169
return appid > LAST_APPLICATION_UID;
170170
}
171171

172-
static struct group_info root_groups = { .usage = ATOMIC_INIT(2) };
172+
#if LINUX_VERSION_CODE >= KERNEL_VERSION (6, 7, 0)
173+
static struct group_info root_groups = { .usage = REFCOUNT_INIT(2), };
174+
#else
175+
static struct group_info root_groups = { .usage = ATOMIC_INIT(2) };
176+
#endif
173177

174178
static void setup_groups(struct root_profile *profile, struct cred *cred)
175179
{

kernel/selinux/sepolicy.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,8 +552,8 @@ static bool add_filename_trans(struct policydb *db, const char *s,
552552
}
553553

554554
if (trans == NULL) {
555-
trans = (struct filename_trans_datum *)kcalloc(sizeof(*trans),
556-
1, GFP_ATOMIC);
555+
trans = (struct filename_trans_datum *)kcalloc(1 ,sizeof(*trans),
556+
GFP_ATOMIC);
557557
struct filename_trans_key *new_key =
558558
(struct filename_trans_key *)kmalloc(sizeof(*new_key),
559559
GFP_ATOMIC);

0 commit comments

Comments
 (0)