[PATCH] NOT A REAL COMMIT

From: Not My Commit
Date: Sat Oct 08 2022 - 01:44:57 EST


THIS IS JUST FOR SYZBOT.
---
kernel/cgroup/cgroup.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 8ad2c267ff47..f8386a066e0e 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -4934,6 +4934,9 @@ static int cgroup_may_write(const struct cgroup *cgrp, struct super_block *sb)

lockdep_assert_held(&cgroup_mutex);

+ if (!cgrp->procs_file.kn)
+ return -ENODEV;
+
inode = kernfs_get_inode(sb, cgrp->procs_file.kn);
if (!inode)
return -ENOMEM;
--
2.34.1