lkml.org 
[lkml]   [2019]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v10 4/9] cgroup: cgroup v2 freezer
Date
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

\
 
 \ /
  Last update: 2019-04-25 00:11    [W:0.145 / U:3.048 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site