Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1414652imw; Tue, 5 Jul 2022 09:03:24 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tkVDyl0zqEQ/TZdUTdijK4zsLB7ybx8p7eBnGD6wt/QS0GKfQMLTdQsQbM7QUYOWlenwhi X-Received: by 2002:a17:903:40c9:b0:16b:f5c2:68f9 with SMTP id t9-20020a17090340c900b0016bf5c268f9mr2525746pld.56.1657037004663; Tue, 05 Jul 2022 09:03:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657037004; cv=none; d=google.com; s=arc-20160816; b=GbLspgS5p+0oi4relJEU9v1T/oq+jXNdgYzWIGmEY68g7/fxIZgJ6PkfqVMoGqarvd xS4EC+uKjEmR2UnWdasdITQquEbOJCOEyOwCKa3+WyyyFRZoEU/APT2mgyoEJjzUXAEc NjhcpQLVTxrBPKUEsMnTxZrbse5vbaUHZoF287c7hRwrMY5nkstd846LwAsPj+Hdw/7Z Y0F5rrHHOvc6jRxv3srcbh3ZLJqb668tt1lzSNa0x8Y32rYwGmcAgweCzqwoavAM+YiM vQnfN5L43Njz3xwyzk3bQp6Rh8SKwfBOhlL8JmRMoHxhkkXgCsjJ3ZrnkcOpI8lUUpGU FFow== 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; bh=QUHmV30a9FFgQLQBaSH8kDOTXJROvMBMzVLuUEt9kik=; b=ewpfucMTr7qQ6kM0G7L+cKcfUaIETL46LJO5tXCwrIP+MoI5U+3B2syhxXcz0smbk5 3EjvYPR2NRJqR//osLVJpypVErO16EPMr1uf5il4/G/2n1mkXdiXQgIUd0Q6DidRa/IF 8yUTSb2oL17wGhm6iSvicn5c1VufbTuqQcvZgZT2v2BjK63IrtgvTXP9mBEw6PE04XPV yVS/qKtUZ53Z/OW8buiWWYRV9x5tla6Am0172YvuQrjUqtXhQsMapWU8OtF/IIE8iQK7 GlIjwwSHjcDAWAf3qEE+zkGldWYryYDVQ1Q0kYInFUISBFUv/MS2K/kHJI5nWkWpp7ly c4WA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r206-20020a632bd7000000b0041264df6df6si5080407pgr.248.2022.07.05.09.03.07; Tue, 05 Jul 2022 09:03:24 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231856AbiGEPaS (ORCPT + 99 others); Tue, 5 Jul 2022 11:30:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231670AbiGEPaK (ORCPT ); Tue, 5 Jul 2022 11:30:10 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 29EF81A806; Tue, 5 Jul 2022 08:30:03 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2E7C4D6E; Tue, 5 Jul 2022 08:30:03 -0700 (PDT) Received: from e126311.manchester.arm.com (unknown [10.57.71.227]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1AB343F66F; Tue, 5 Jul 2022 08:29:59 -0700 (PDT) Date: Tue, 5 Jul 2022 16:29:51 +0100 From: Kajetan Puchalski To: Will Deacon Cc: Florian Westphal , Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Mel Gorman , lukasz.luba@arm.com, dietmar.eggemann@arm.com, mark.rutland@arm.com, broonie@kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, stable@vger.kernel.org, regressions@lists.linux.dev, linux-kernel@vger.kernel.org, peterz@infradead.org Subject: Re: [Regression] stress-ng udp-flood causes kernel panic on Ampere Altra Message-ID: References: <20220701200110.GA15144@breakpoint.cc> <20220702205651.GB15144@breakpoint.cc> <20220705105749.GA711@willie-the-truck> <20220705110724.GB711@willie-the-truck> <20220705112449.GA931@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220705112449.GA931@willie-the-truck> X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 > > > Sorry, but I have absolutely no context here. We have a handy document > > > describing the differences between atomic_t and refcount_t: > > > > > > Documentation/core-api/refcount-vs-atomic.rst > > > > > > What else do you need to know? > > > > Hmm, and I see a tonne of *_inc_not_zero() conversions in 719774377622 > > ("netfilter: conntrack: convert to refcount_t api") which mean that you > > no longer have ordering to subsequent reads in the absence of an address > > dependency. > > I think the patch above needs auditing with the relaxed behaviour in mind, > but for the specific crash reported here possibly something like the diff > below? > > Will > > --->8 > > diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c > index 082a2fd8d85b..5ad9fcc84269 100644 > --- a/net/netfilter/nf_conntrack_core.c > +++ b/net/netfilter/nf_conntrack_core.c > @@ -1394,6 +1394,7 @@ static unsigned int early_drop_list(struct net *net, > * already fired or someone else deleted it. Just drop ref > * and move to next entry. > */ > + smp_rmb(); /* XXX: Why? */ > if (net_eq(nf_ct_net(tmp), net) && > nf_ct_is_confirmed(tmp) && > nf_ct_delete(tmp, 0, 0)) > With this patch applied the issue goes away as well. The test runs fine well beyond where it would crash previously so looks good, thanks!