8c4a1c3a3e88ba21381b51fab38acaa0dc303d68
[openwrt/staging/nbd.git] /
1 From 166dfc4399643681f2e4277bf7b7407e926861e5 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Mon, 9 Dec 2024 14:58:16 +0000
4 Subject: [PATCH] fixup! cgroup: Use kernel command line to disable memory
5 cgroup
6
7 cgroup features are distinct from cgroup subsystems - handle them
8 correctly.
9
10 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
11 ---
12 kernel/cgroup/cgroup.c | 10 +++++++++-
13 1 file changed, 9 insertions(+), 1 deletion(-)
14
15 --- a/kernel/cgroup/cgroup.c
16 +++ b/kernel/cgroup/cgroup.c
17 @@ -6769,11 +6769,19 @@ static int __init cgroup_enable(char *st
18 strcmp(token, ss->legacy_name))
19 continue;
20
21 - cgroup_feature_disable_mask &= ~(1 << i);
22 static_branch_enable(cgroup_subsys_enabled_key[i]);
23 pr_info("Enabling %s control group subsystem\n",
24 ss->name);
25 }
26 +
27 + for (i = 0; i < OPT_FEATURE_COUNT; i++) {
28 + if (strcmp(token, cgroup_opt_feature_names[i]))
29 + continue;
30 + cgroup_feature_disable_mask &= ~(1 << i);
31 + pr_info("Enabling %s control group feature\n",
32 + cgroup_opt_feature_names[i]);
33 + break;
34 + }
35 }
36 return 1;
37 }