Re: [PATCH v2 3/6] cgroup: cgroup v2 freezer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux