From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751447AbdAQRmZ (ORCPT ); Tue, 17 Jan 2017 12:42:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57362 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751204AbdAQRmX (ORCPT ); Tue, 17 Jan 2017 12:42:23 -0500 Date: Tue, 17 Jan 2017 18:41:20 +0100 From: Oleg Nesterov To: Davidlohr Bueso Cc: mingo@kernel.org, peterz@infradead.org, linux-kernel@vger.kernel.org, Davidlohr Bueso Subject: Re: [PATCH 1/2] sched: Introduce rcuwait machinery Message-ID: <20170117174120.GB4754@redhat.com> References: <1482426096-12792-1-git-send-email-dave@stgolabs.net> <1482426096-12792-2-git-send-email-dave@stgolabs.net> <20170116013232.GA7295@linux-80c1.suse> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170116013232.GA7295@linux-80c1.suse> User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 17 Jan 2017 17:42:23 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.