On Wed, Apr 24, 2019 at 06:02:38PM +0200, Oleg Nesterov wrote:
> On 04/05, Roman Gushchin wrote:
> >
> > @@ -5830,6 +5926,12 @@ void cgroup_exit(struct task_struct *tsk)
> >             spin_lock_irq(&css_set_lock);
> >             css_set_move_task(tsk, cset, NULL, false);
> >             cset->nr_tasks--;
> > +
> > +           if (unlikely(cgroup_task_frozen(tsk)))
> > +                   cgroup_freezer_frozen_exit(tsk);
> > +           else if (unlikely(cgroup_task_freeze(tsk)))
> > +                   cgroup_update_frozen(task_dfl_cgroup(tsk));
> > +

Hello, Oleg!

A good catch! It's actually a leftover from one of the previous versions
of the patchset. In the current iteration I'd replace it with:

        WARN_ON_ONCE(cgroup_task_frozen(tsk));

just to make sure we're not leaking the frozen bit.
Do you agree?

Thank you!

Roman

Reply via email to