lkml.org 
[lkml]   [2019]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH cgroup/for-5.5] cgroup: remove cgroup_enable_task_cg_lists() optimization
[Removing a few people from Cc to avoid spamming the whole world]

On Fri, Oct 25, 2019 at 05:52:25PM +0200, Oleg Nesterov wrote:
> On 10/25, Christian Brauner wrote:
> >
> > On Fri, Oct 25, 2019 at 04:13:25PM +0200, Oleg Nesterov wrote:
> > > Almost every usage of task->flags (load or sore) can be reported as "data race".
> > >
> > > Say, you do
> > >
> > > if (task->flags & PF_KTHREAD)
> > >
> > > while this task does
> > >
> > > current->flags |= PF_FREEZER_SKIP;
> > > schedule().
> > >
> > > this is data race.
> >
> > Right, but I thought we agreed on WONTFIX in those scenarios?
> > The alternative is to READ_ONCE()/WRITE_ONCE() all of these.
>
> Well, in my opinion this is WONTFIX, but I won't argue if someone
> adds _ONCE to all of these. Same for task->state, exit_state, and
> more.

Well, I honestly think that state and exit_state would make sense.
There already were issues that got fixed for example in 3245d6acab98
("exit: fix race between wait_consider_task() and wait_task_zombie()")
and as far as I understand this would also help kcsan to better detect
races.

Christian

\
 
 \ /
  Last update: 2019-10-25 19:07    [W:0.056 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site