Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1321869rwi; Wed, 19 Oct 2022 09:11:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5MkxI/xceGiT3xlnY5CPX9O35DexfAjB76yq37In0iSEGTDiTIWyzIxDkcTcbBwGQaUION X-Received: by 2002:aa7:ca45:0:b0:458:d9a2:6164 with SMTP id j5-20020aa7ca45000000b00458d9a26164mr8360773edt.340.1666195903871; Wed, 19 Oct 2022 09:11:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666195903; cv=none; d=google.com; s=arc-20160816; b=sQcSeGWUY+CNGJxeoa935DhnHaVuNUEZq7zLTWSMX7kC7MD6BwNrLTecb9il7s5rrP yoNyxHEvpYz5ZDRNn2nQAYJsOmqntv7JW41yH6lPJ8K/LfIa5ztOUXKo5I+n+NOaFn5u D5peDNZfX6u11m8TdhB4sb4XOAwh1B7iGPFomuoPazp5MnQeKp6GvcIxMLILCHnajo1c 01DDFxzRzMxSAlKwrddbjLsB6h04K/k1Ei6izFNv8BWhR23LDjOemuYcLDTLNo4b7GQ2 aUaCmz4ijI7GtoN22kS0w7vmXNH4PBpeaBMUaixnqa9X+BctaTRztgUAD1rsiQ06tjHg BrwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2OUDXzbVuIoMc0Z7wXuO7LUg5Fx2hqM4KWmehgRHT98=; b=XrLuev4WAwNzM2m2YVA974vkcVykrW+MHJJ+jpx1KWYme72mAJFbX+7x+ZtuAnG39c ZjNFxfmt4wpWyfyT+RqT7a2Uv5OCwm8SjdnxsPmLDgUxPieYEGMhzZf07nY5HWeL89d1 qcLaeGGgLfF1r4dmKyxsINnIY97H1ZevkjU5chFjql9zshZmM9mN+5GcY5Ra+ltdvOfi dztJRkM4RTZBD7euVBcn+dXkMsFrh2iwkHUCFBhUN+tchmgS5WqzITflh4gSheHCBGLc gSTgbjyDqOmTz/fNGsaJifW1LKYfjF5i+dM8Pk/49n8n4y77Vu7NWFTgzxxe+guK1d2R VEVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=durc5FUE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w15-20020a50c44f000000b0045a26e1b603si13852973edf.531.2022.10.19.09.11.08; Wed, 19 Oct 2022 09:11:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=durc5FUE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231824AbiJSQDM (ORCPT + 99 others); Wed, 19 Oct 2022 12:03:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230196AbiJSQCx (ORCPT ); Wed, 19 Oct 2022 12:02:53 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 663B2120EF7 for ; Wed, 19 Oct 2022 09:01:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2F12AB824FA for ; Wed, 19 Oct 2022 16:01:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9EC61C433C1; Wed, 19 Oct 2022 16:01:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666195304; bh=GihHyTSy2xQe2pRTAJxMrcMP9JdqHBFRWGP16YIKPD0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=durc5FUE3XHNVactgpcfBT4GMJkIfVXWeDUghddaWMG0gLfkBD8uOgLXEcbYtS4lX 4uFjPpMgla2ymtkoBrvD/EvBHkez5ZvTD6umVSjPRJ1ykmstZrzywBpbSvn9tf8UCV Rck0R/fmQv0Zvg+3s0Vie5NvdcLR5Qj8HPWHkm2s= Date: Wed, 19 Oct 2022 18:01:36 +0200 From: Greg Kroah-Hartman To: John Ogness Cc: Petr Mladek , Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: Re: [PATCH printk v2 04/38] printk: introduce console_is_enabled() wrapper Message-ID: References: <20221019145600.1282823-1-john.ogness@linutronix.de> <20221019145600.1282823-5-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221019145600.1282823-5-john.ogness@linutronix.de> X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 19, 2022 at 05:01:26PM +0206, John Ogness wrote: > After switching to SRCU for console list iteration, some readers > will begin accessing console->flags as a data race. This is safe > because there is at most one CPU modifying console->flags and > using rmw operations. > > The primary reason for readers to access console->flags is to > check if the console is enabled. Introduce console_is_enabled() > to mark such access as a data race. > > Signed-off-by: John Ogness Reviewed-by: Greg Kroah-Hartman