[Devel] [PATCH RH7 1/3] cgroup: remove rcu_read_lock from cgroup_get_ve_root
Pavel Tikhomirov
ptikhomirov at virtuozzo.com
Wed Nov 1 16:49:09 MSK 2017
It is likely a leftover from __cgroup_path where it protects cgrp->name
in cgroup_get_ve_root there is nothing rcu_dereferenced, also in
cgroup_is_descendant there is no rcu for cgrp->parent.
https://jira.sw.ru/browse/PSBM-69678
Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
---
kernel/cgroup.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index f960c342aef8..06863de12c6e 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -4284,7 +4284,6 @@ static struct cgroup *cgroup_get_ve_root(struct cgroup *cgrp)
{
struct cgroup *ve_root = NULL;
- rcu_read_lock();
do {
if (test_bit(CGRP_VE_ROOT, &cgrp->flags)) {
ve_root = cgrp;
@@ -4292,7 +4291,6 @@ static struct cgroup *cgroup_get_ve_root(struct cgroup *cgrp)
}
cgrp = cgrp->parent;
} while (cgrp);
- rcu_read_unlock();
return ve_root;
}
--
2.13.5
More information about the Devel
mailing list