Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp14415553ybl; Mon, 30 Dec 2019 09:41:34 -0800 (PST) X-Google-Smtp-Source: APXvYqyaKwiyupP1e9Q11FyQNuNo7dZxxlzQts82ZaH6jEX/6KUtUYjXmeQ/uHvbxjldJYMu3WKc X-Received: by 2002:a9d:7999:: with SMTP id h25mr75562047otm.347.1577727694050; Mon, 30 Dec 2019 09:41:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577727694; cv=none; d=google.com; s=arc-20160816; b=i90jYgoRaNOyCYqbpVztXNJ8N1UGf/uhCTQcMQXgdZIpSM44cO3i1ROTVn/qfautX5 v9Tmme5fdLCkMigMV1zbLArj6WWy62a4r3P22ZDCC3fookBbPVONGscHjLOLyLunDpnF rl51Jck5pF7JVcYiC3bjPPdjvv9X/ms7r3jIVkcUsBSMeFPruCUzN3kvh/MabRzkjSBW T+qik5ID70L8srnU9Juu3EcQG+HLsw95lrf8WXCdhBuB7DdPkaCpOQeiuz9FBkeTyjUX TbwLRG/+j6v4JuBghax3NgTAnhW39LPMSy6U4qCRxNDsfEa9s+vROqOIhfhs/2ps7CdF N5wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=x3Ya0jfNz+L3KWMLv+ZmX2Oj+GOIQPnxd0j7MlmPmEE=; b=nXvpjSD9KduZAYi2W3XV7bTawlFiHWB+jRY9WJpN8lU+2wqIwnP13YQYWQ0C3ah/Q1 4qDzAdVEBgieOdLmc9B/x/ZFLWub4zZ6TIckz4bi6ZtTb/AoJcVnONRQT7AZpJX73DWA 9STRW7zS0LU38ltSxPNA2AHiRtqv0KxtMaBR+rPtxS/F1kN0xDXwIhOqdCCJ2ufHziIm JRJFUEjn3MwQi5vgYapWm5v8AkiLvu8BZPROs3Cta/G+yX9VDemw8Lw0TLv3LznaHHP9 OwAbh5Gclo0OuveMvygr9PIDzWUeU+iazdI66a6DLOPaGlk1DZ+vJVjBQp3lbLGX51k0 SFcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HdzW7rH1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e59si24802795ote.97.2019.12.30.09.41.22; Mon, 30 Dec 2019 09:41:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HdzW7rH1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727486AbfL3Rjs (ORCPT + 99 others); Mon, 30 Dec 2019 12:39:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:44738 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726602AbfL3Rjs (ORCPT ); Mon, 30 Dec 2019 12:39:48 -0500 Received: from localhost (lfbn-ncy-1-150-155.w83-194.abo.wanadoo.fr [83.194.232.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8CAB520409; Mon, 30 Dec 2019 17:39:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577727588; bh=D3Q8pCZEwFu1FI0ot0RtUu0DgLxkR3MJgRisFehfLwQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HdzW7rH1E3OBppFIs9xpZUh7tHhJjs0ynVQR7U26zfgc5qAgWTzbqUUjPpCmPS9D6 7FqlCOk2jz9Oz20c2QM5mt1lyaOdQAn2QBBFfuny/YkJjoQZix7U4BCe+RCX4ACAqV 8ytOt66KaKp1XuoxTL412I/QwBb1HiWfnQi72ZaM= Date: Mon, 30 Dec 2019 18:39:44 +0100 From: Frederic Weisbecker To: Chris Wilson Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar Subject: Re: [PATCH] sched/vtime: Prevent unstable evaluation of WARN(vtime->state) Message-ID: <20191230173943.GA12625@lenoir> References: <20191230010839.GA8740@lenoir> <20191230090436.3749235-1-chris@chris-wilson.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191230090436.3749235-1-chris@chris-wilson.co.uk> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 30, 2019 at 09:04:36AM +0000, Chris Wilson wrote: > As the vtime is sampled under loose seqcount protection by kcpustat, the > vtime fields may change as the code flows. Where logic dictates a field > has a static value, use a READ_ONCE. > > Fixes: 74722bb223d0 ("sched/vtime: Bring up complete kcpustat accessor") > Signed-off-by: Chris Wilson > Cc: Frederic Weisbecker > Cc: Peter Zijlstra > Cc: Ingo Molnar Oh thanks for taking the time to make it a proper patch! Looks good, I'm relaying it.