1 From 63f5acdf097b7baca8d0f7056a037f8811b48aaa Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Jos=C3=A9=20Bollo?= <jose.bollo@iot.bzh>
3 Date: Tue, 27 Feb 2018 17:06:21 +0100
4 Subject: [PATCH] Smack: Handle CGROUP2 in the same way that CGROUP
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 The new file system CGROUP2 isn't actually handled
10 by smack. This changes makes Smack treat equally
11 CGROUP and CGROUP2 items.
13 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
15 security/smack/smack_lsm.c | 2 ++
16 1 file changed, 2 insertions(+)
18 diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
19 index 03fdecba93bb..5d77ed04422c 100644
20 --- a/security/smack/smack_lsm.c
21 +++ b/security/smack/smack_lsm.c
22 @@ -3431,6 +3431,7 @@ static void smack_d_instantiate(struct dentry *opt_dentry, struct inode *inode)
23 if (opt_dentry->d_parent == opt_dentry) {
24 switch (sbp->s_magic) {
25 case CGROUP_SUPER_MAGIC:
26 + case CGROUP2_SUPER_MAGIC:
28 * The cgroup filesystem is never mounted,
29 * so there's no opportunity to set the mount
30 @@ -3474,6 +3475,7 @@ static void smack_d_instantiate(struct dentry *opt_dentry, struct inode *inode)
31 switch (sbp->s_magic) {
33 case CGROUP_SUPER_MAGIC:
34 + case CGROUP2_SUPER_MAGIC:
36 * Casey says that it's a little embarrassing
37 * that the smack file system doesn't do