+static struct sgx_cgroup *sgx_cgroup_next_descendant_pre(struct sgx_cgroup *root,
+                                                        struct sgx_cgroup *cg)
+{
+       struct cgroup_subsys_state *next;
+
+       rcu_read_lock();
+       for (;;) {
+               next = css_next_descendant_pre(&cg->cg->css, &root->cg->css);

I  messed it up in a last minute change and rebase. Above should be:

+       struct cgroup_subsys_state *next = &cg->cg->css;
+
+       rcu_read_lock();
+       for (;;) {
+               next = css_next_descendant_pre(next, &root->cg->css);

Fixed in a branch here: https://github.com/haitaohuang/linux/tree/sgx_cg_upstream_v16_plus
Will include in next version or update if needed.

+               if (!next) {
+                       next = &root->cg->css;
+                       break;
+               }
+
+               if (css_tryget(next))
+                       break;
+       }
+       rcu_read_unlock();
+
+       return sgx_cgroup_from_misc_cg(css_misc(next));
+}
+
BR
Haitao

Reply via email to