Re: [PATCH v2 3/6] cgroup: cgroup v2 freezer
From: Tejun Heo <tj@kernel.org>
Date: 2018-11-13 20:58:37
Also in:
lkml
From: Tejun Heo <tj@kernel.org>
Date: 2018-11-13 20:58:37
Also in:
lkml
On Tue, Nov 13, 2018 at 08:55:11PM +0000, Roman Gushchin wrote:
quoted
quoted
quoted
quoted
+ 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