[Devel] [PATCH RHEL7 COMMIT] cgroup: add missing dput() in cgroup_unmark_ve_roots()
Vasily Averin
vvs at virtuozzo.com
Sat Aug 29 10:20:02 MSK 2020
The commit is pushed to "branch-rh7-3.10.0-1127.18.2.vz7.163.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1127.18.2.vz7.163.14
------>
commit cab13b0bffe532eeec00d0421d573f95dc4a6ef1
Author: Andrey Ryabinin <aryabinin at virtuozzo.com>
Date: Sat Aug 29 10:20:02 2020 +0300
cgroup: add missing dput() in cgroup_unmark_ve_roots()
cgroup_unmark_ve_roots() calls dget() on cgroup's dentry but don't
have the corresponding dput() call. This leads to leaking cgroups.
Add missing dput() to fix this.
https://jira.sw.ru/browse/PSBM-107328
Fixes: 1ac69e183447 ("ve/cgroup: added release_agent to each container root cgroup.")
Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
---
kernel/cgroup.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 55713a0..5f311180 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -4719,6 +4719,7 @@ void cgroup_unmark_ve_roots(struct ve_struct *ve)
mutex_lock(&inode->i_mutex);
mutex_lock(&cgroup_mutex);
cgroup_rm_file(cgrp, cft);
+ dput(cgrp->dentry);
BUG_ON(!rcu_dereference_protected(cgrp->ve_owner,
lockdep_is_held(&cgroup_mutex)));
rcu_assign_pointer(cgrp->ve_owner, NULL);
More information about the Devel
mailing list