lkml.org 
[lkml]   [2021]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] cgroup: Fix incorrect warning from cgroup_apply_control_disable()
Hello,

On Thu, Sep 09, 2021 at 10:42:55PM -0400, Waiman Long wrote:
> diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
> index 881ce1470beb..e31bca9fcd46 100644
> --- a/kernel/cgroup/cgroup.c
> +++ b/kernel/cgroup/cgroup.c
> @@ -3140,7 +3140,16 @@ static void cgroup_apply_control_disable(struct cgroup *cgrp)
> if (!css)
> continue;
>
> - WARN_ON_ONCE(percpu_ref_is_dying(&css->refcnt));
> + /*
> + * A kill_css() might have been called previously, but
> + * the css may still linger for a while before being
> + * removed. Skip it in this case.
> + */
> + if (percpu_ref_is_dying(&css->refcnt)) {
> + WARN_ON_ONCE(css->parent &&
> + cgroup_ss_mask(dsct) & (1 << ss->id));
> + continue;
> + }

This warning did help me catch some gnarly bugs. Any chance we can keep it
for normal cases and elide it just for remounting?

Thanks.

--
tejun

\
 
 \ /
  Last update: 2021-09-13 20:06    [W:0.059 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site