[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181113205831.GP2509588@devbig004.ftw2.facebook.com>
Date: Tue, 13 Nov 2018 12:58:31 -0800
From: Tejun Heo <tj@...nel.org>
To: Roman Gushchin <guro@...com>
Cc: Roman Gushchin <guroan@...il.com>, Oleg Nesterov <oleg@...hat.com>,
"cgroups@...r.kernel.org" <cgroups@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Kernel Team <Kernel-team@...com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...hat.com>
Subject: Re: [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
Powered by blists - more mailing lists