[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170117174120.GB4754@redhat.com>
Date: Tue, 17 Jan 2017 18:41:20 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Davidlohr Bueso <dave@...olabs.net>
Cc: mingo@...nel.org, peterz@...radead.org,
linux-kernel@...r.kernel.org, Davidlohr Bueso <dbueso@...e.de>
Subject: Re: [PATCH 1/2] sched: Introduce rcuwait machinery
On 01/15, Davidlohr Bueso wrote:
>
> On Thu, 22 Dec 2016, Bueso wrote:
>
>> + WARN_ON(current->exit_state); \
>
> While not related to this patch, but per 3245d6acab9 (exit: fix race
> between wait_consider_task() and wait_task_zombie()), should we not
> *_ONCE() all things ->exit_state?
current->exit_state != 0 is stable. I mean, only current can change it
from zero to non-zero, and once it is non-zero it can't be zero again.
> I'm not really refering to a specific
> bug (much less here, where that race would not matter obviously), but
> if nothing else, for documentation
Oh, I won't argue but I do not agree. To me, READ_ONCE() often adds some
confusion because I can almost never understand if it is actually needed
for correctness or it was added "just in case".
Oleg.
Powered by blists - more mailing lists