Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp344299rwe; Wed, 31 Aug 2022 04:00:54 -0700 (PDT) X-Google-Smtp-Source: AA6agR7zGAOMxe2iXTkNqGg/aLVDExdBftZY2Op5UxBsyGGaJol+W+/HJNISrA1mo5KReLL8ABz6 X-Received: by 2002:a17:907:8a1a:b0:731:6475:68f7 with SMTP id sc26-20020a1709078a1a00b00731647568f7mr19375308ejc.359.1661943653925; Wed, 31 Aug 2022 04:00:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661943653; cv=none; d=google.com; s=arc-20160816; b=hw9tJ1OTh4WZ8orw2gWiFCl2DTNJyQFVIVO+JuXZ/CxAdP4SbvvsPdQo49+/FuAIyZ yucgQchrWO73ItnTzMIdhSeEvy+X6zGu9ctTB3uwzZURsTnw41XJ5kt5vOfQ5YpBbAxs BVPE4ugZF6QK/yDYvRPjPcbUmP2MehIuNwOD1C6qiMf09ggxS19JLUSt458XohOOEGwv U8wOVi/CjqbTZJISQgHVDUSJbo2CeWhFnbp7ioV5JubQI+jtNiMrkpMCwApb+2pSXZTc IZjXnpUCF/W2XIX1bN6ZFo+FlRKlAI9b+QFujXXfIR0J6oeeSA2af5fo5jlccVDayp16 wl6g== 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:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=a17ApQdTSJlaCzMln3gOgIR94f500vY7x3HIFsQbFJk=; b=uccrKEGEOTt9yp9a+Jum2YX6MBy6RcXtC4t/qh+Q1GDwiNHjfAGM3IjKb91i5Sagyt wit/+I+Ma1iqHm6rP5XZFTdl20wRqn5Bs8u0VMP8jto1ffoApj62ENdG/soGQo2juAxv LZzkz2iSUI+iR/1I8mSyi7/hFR6jakb1jSZN6oOBgWKLe7Cn5bY1am/+bBWvALUHrqrz s/5m0vO139hsaUJ4G1eFlFOIJvmTbtCfrJm9qwzq0KI0my8qVd6aCoDW+0qg+xx5OCl8 +XrK00+PVX4zwc/crXyZb4wkiFy9qhHf+PhNk+WFIW1PpTYBSzeouX5wcrRN7+KqzAz6 oL+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MxAnuY+p; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e25-20020a17090681d900b0073d68cb42f0si8953782ejx.717.2022.08.31.04.00.28; Wed, 31 Aug 2022 04:00:53 -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=@kernel.org header.s=k20201202 header.b=MxAnuY+p; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230239AbiHaK5N (ORCPT + 99 others); Wed, 31 Aug 2022 06:57:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230060AbiHaK5L (ORCPT ); Wed, 31 Aug 2022 06:57:11 -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 E0DB7CAC8D for ; Wed, 31 Aug 2022 03:57:10 -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 9A39CB81FF5 for ; Wed, 31 Aug 2022 10:57:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4AA0AC433D6; Wed, 31 Aug 2022 10:57:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661943428; bh=AcZZZkQyVF2bDFbGmh47igrqNgqi57iGKTnF8zvHbU4=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=MxAnuY+pgMoeF8dV0+CH41J0Es90hVxbDQVvFZjaE2OSQr/LM+z/2zWzGr8uZGPZl 1OgF7A8k1XXjkPKhsnCnzrQexnBBkJeZKsoFWHmExhfZK6XqkNH6s645UmqtAkUafk MpdJA3jgfJw29/E3MWmm22+e/siSvOoDANpZiw8xxJznlEsRQ3XK4I/6l3E+2LIhVD r7ZHSQ2KY4kjT6xKJf/q95nLtlZreeoE4qTJcRgborFCbt+0M84cjKPBcAVyOeujeU WpGqqnYZPHZKKaExSZGl8IR3NKXNNbOGKeD4mJGFGqmiAex2zzDUb675aS6xm6rOkO zgLb8IkWpfX3Q== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id DF6B05C05A0; Wed, 31 Aug 2022 03:57:07 -0700 (PDT) Date: Wed, 31 Aug 2022 03:57:07 -0700 From: "Paul E. McKenney" To: kernel test robot Cc: Neeraj Upadhyay , LKML , lkp@lists.01.org, lkp@intel.com, qiang1.zhang@intel.com Subject: Re: [rcutorture] 613b00fbe6: WARNING:at_kernel/rcu/rcutorture.c:#rcu_torture_fwd_prog_cr[rcutorture] Message-ID: <20220831105707.GJ6159@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 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,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 On Wed, Aug 03, 2022 at 11:05:12PM +0800, kernel test robot wrote: > > (please be noted we reported this since clean on parent, ~10% on this commit, > and found similar issue on latest maineline, e.g. v5.19) > > > Greeting, > > FYI, we noticed the following commit (built with gcc-11): > > commit: 613b00fbe64461f1c73e035e07c22cf3de65740b ("rcutorture: Add ability to limit callback-flood intensity") > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master > > in testcase: rcutorture > version: > with following parameters: > > runtime: 300s > test: default > torture_type: tasks-tracing > > test-description: rcutorture is rcutorture kernel module load/unload test. > test-url: https://www.kernel.org/doc/Documentation/RCU/torture.txt > > > on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G I believe that this commit in -rcu fixes this problem. Could you please check it? Thanx, Paul ------------------------------------------------------------------------ commit dba268ff32101559cd3e3800b24993ae5c59844c Author: Zqiang Date: Sun Jul 31 18:53:56 2022 +0800 rcutorture: Use the barrier operation specified by cur_ops The rcutorture_oom_notify() function unconditionally invokes rcu_barrier(), which is OK when the rcutorture.torture_type value is "rcu", but unhelpful otherwise. The purpose of these barrier calls is to wait for all outstanding callback-flooding callbacks to be invoked before cleaning up their data. Using the wrong barrier function therefore risks arbitrary memory corruption. Thus, this commit changes these rcu_barrier() calls into cur_ops->cb_barrier() to make things work when torturing non-vanilla flavors of RCU. Signed-off-by: Zqiang Signed-off-by: Paul E. McKenney diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index 7168dc8d61e98..bdd630f7a970c 100644 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c @@ -2603,12 +2603,12 @@ static int rcutorture_oom_notify(struct notifier_block *self, for (i = 0; i < fwd_progress; i++) ncbs += rcu_torture_fwd_prog_cbfree(&rfp[i]); pr_info("%s: Freed %lu RCU callbacks.\n", __func__, ncbs); - rcu_barrier(); + cur_ops->cb_barrier(); ncbs = 0; for (i = 0; i < fwd_progress; i++) ncbs += rcu_torture_fwd_prog_cbfree(&rfp[i]); pr_info("%s: Freed %lu RCU callbacks.\n", __func__, ncbs); - rcu_barrier(); + cur_ops->cb_barrier(); ncbs = 0; for (i = 0; i < fwd_progress; i++) ncbs += rcu_torture_fwd_prog_cbfree(&rfp[i]);