lkml.org 
[lkml]   [2018]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 3/6] cgroup: cgroup v2 freezer
On Tue, Nov 13, 2018 at 08:55:11PM +0000, Roman Gushchin wrote:
> > > > > + if (lock_task_sighand(task, &flags)) {
> > > > > + if (test_bit(CGRP_FREEZE, &dst->flags))
> > > > > + task->jobctl |= JOBCTL_TRAP_FREEZE;
> > > > > + else
> > > > > + task->jobctl &= ~JOBCTL_TRAP_FREEZE;
> > > >
> > > > How are these flags synchronized?
> > >
> > > Using the css_set_lock.
> >
> > But other JOBCTL_TRAP bits aren't synchronized by css_set_lock, right?
>
> But if we don't touch this bit anywhere else, should be fine, right?

But other JOBCTL_TRAP_ bits aren't synchronized with css_set_lock, so
they can be updated (read-modify-write) concurrently and clobber each
other, no?

Thanks.

--
tejun

\
 
 \ /
  Last update: 2018-11-13 21:58    [W:0.040 / U:7.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site