Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp901557ybi; Tue, 16 Jul 2019 06:52:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqx2s/5ZGqT/2YXE5AU6JJh4LbXurGcGzeXSWb+KAoAWX11z8wTekp5ZonuTWc03MDl87j8r X-Received: by 2002:a17:90a:2525:: with SMTP id j34mr37704695pje.11.1563285170033; Tue, 16 Jul 2019 06:52:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563285170; cv=none; d=google.com; s=arc-20160816; b=v1SZpctJ4NHMnFEBzYHB0cq50YkYc+QFvubNs1ddOKnO3ziNNabuz7BHEqbMEr5NZd 8QciJSqkxZbpgcFPQn31z8QmApWk/qHKpB4MtEiA3rxfqNFuyDaE7L50AlDvde6Q+jdP D081AQ9QLJj6XtyQ6Fr/OIw8nUR6IuttQMOQg/Kcnir2JBwMBlS68SidSlM+F5EejtNK T0v1XKbXYfZ9/xKyDrM1Rlzjn9Id0JezESPo9wum83Xd+TdgxtRadR9OL3ybbxpP7fKe 18c2oJsTLMiopNg0N5ykMgnxb3lsyMmR/Bdu7OC0U5qJg6XcXhAJTuWoTyzV4iYzC61K cA3A== 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=4QEK7Azm4CXxHXb645Kj2aMTlcOadurBJ2fe5B7TS1M=; b=0GVDTNIc9TxZdZSIKcjU0UWMtqBvm8+6e0o1nMOLT4ig0Lm5iwxT12+ApJUs6hmYCs oStMmL1P5aGpDB8M0wYadEwS4KgIk/7V0S96DDaQOSgfreJxm6nqu07UI+HxqSCTkM2p SI/JmjvGIJXoqvMKk6N5QNBwRJi3+m4cZ/gIH6LPSzBipoqrz8EhQ5aR9b6xgU/V/lEH 45WtlZ7g8Oej9614P4r9zzWUR4JZr4JQy+mLaMfkVoWWZ/+pBIpoJUT3eSYfec3+8yvQ JS3KXuTG9vKa2kNLgrP+ow4pEhPZRl5ypbpxBUPZRdpM8glYpuXXa++KKHn9JIfze9Nc kPrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=apjGQC4h; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w3si19506682pgl.499.2019.07.16.06.52.28; Tue, 16 Jul 2019 06:52:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=apjGQC4h; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387524AbfGPNuf (ORCPT + 99 others); Tue, 16 Jul 2019 09:50:35 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:45156 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726039AbfGPNue (ORCPT ); Tue, 16 Jul 2019 09:50:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=4QEK7Azm4CXxHXb645Kj2aMTlcOadurBJ2fe5B7TS1M=; b=apjGQC4hITTrWEdGA3ONfg2iP /828JlG4UXQWAPe6q3t5vInmtxm/ImNGOVeO2ciL/bHXTCCeJ3lo7PsY7/tBKn2UtrobfSixwiCtY kgRig9A7tfwzAxTlSkwecLEAcJR9Xy0kYhJwN/AwxaGDoTTD9TO1jtLYZgKDGjSi6VNEHRHXGOPeA wlIqIx04Ma33UX3iLA5MjsMbK5lhuPRBCTmaSuroDZSIwaRK2T/XM1hzHphFda9kJ2OgvcKwv/eSw lQDaavZxRRhg5Et/iYJrJzsYbR2BPvH0dKeeReBhTLPmIdxc8zBUqI1qSvv/RI3uot/wtEaj3PNuo +uLlOHQTg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hnNqO-0001Tb-K0; Tue, 16 Jul 2019 13:50:13 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 6CD812059DEA3; Tue, 16 Jul 2019 15:50:10 +0200 (CEST) Date: Tue, 16 Jul 2019 15:50:10 +0200 From: Peter Zijlstra To: Herbert Xu Cc: Steffen Klassert , Daniel Jordan , andrea.parri@amarulasolutions.com, boqun.feng@gmail.com, paulmck@linux.ibm.com, linux-arch@vger.kernel.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] padata: Use RCU when fetching pd from do_serial Message-ID: <20190716135010.GC3402@hirez.programming.kicks-ass.net> References: <20190712100636.mqdr567p7ozanlyl@gondor.apana.org.au> <20190712101012.GW14601@gauss3.secunet.de> <20190712160737.iniaaxlsnhs6azg5@ca-dmjordan1.us.oracle.com> <20190713050321.c5wq7a7jrb6q2pxn@gondor.apana.org.au> <20190715161045.zqwgsp62uqjnvx3l@ca-dmjordan1.us.oracle.com> <20190716100447.pdongriwwfxsuajf@gondor.apana.org.au> <20190716111410.GN17989@gauss3.secunet.de> <20190716125704.l2jolyyd3bue6hhn@gondor.apana.org.au> <20190716131520.GB3402@hirez.programming.kicks-ass.net> <20190716131807.twahbbdff6jhpnu2@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190716131807.twahbbdff6jhpnu2@gondor.apana.org.au> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, Jul 16, 2019 at 09:18:07PM +0800, Herbert Xu wrote: > On Tue, Jul 16, 2019 at 03:15:20PM +0200, Peter Zijlstra wrote: > > > > > @@ -367,7 +368,7 @@ void padata_do_serial(struct padata_priv *padata) > > > struct parallel_data *pd; > > > int reorder_via_wq = 0; > > > > > > - pd = padata->pd; > > > + pd = rcu_dereference_bh(padata->inst->pd); > > > > > > cpu = get_cpu(); > > > > > > > That's weird for not having a matching assign and lacking comments to > > explain that. > > There is a matching rcu_assign_pointer. But we should add some > RCU markers. > > Or perhaps you're misreading the level of indirections :) Could well be, I'm not much familiar with this code; I'll look more careful.