Received: by 2002:a05:622a:251a:b0:39a:b4a2:e86 with SMTP id cm26csp314004qtb; Wed, 19 Oct 2022 02:38:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5G2rjbwF0LQhJWecjazvQCr35+4InogsNvmOUkQbDhsvSS3jlTSC3k0UnFNssmNwHwK9G6 X-Received: by 2002:a65:5886:0:b0:439:8dd3:18d4 with SMTP id d6-20020a655886000000b004398dd318d4mr6455893pgu.430.1666172298926; Wed, 19 Oct 2022 02:38:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172298; cv=none; d=google.com; s=arc-20160816; b=0U6jQCDXKhwYG5GOrRZFXX4GMG0GN3ADa8nEsTI9lHQnggHu1tHq6uk7qTPESRlXBd MT/DKNAXvJ9adxweVJp06dKh8zxJRqCuOLGSdSukZ9PvSY2lKmWXC5DlR3+RIi+9Vq1Q fMCXI98NAMKMIHTZEEWhsRUR2Fve85ehNeSMllqluM6LZq/VyOhNX6++ILzpfzDue3Vs LKZM2MRXDq+xE4BBP7PqwPySyE1eUM61dYFN9UpM5Bwzpg5B0izjzWCp8l0QMCHX0sM3 fHJuEoGKXyASPQ/9VbQ3nRa4G+PD/xslxThjQJSv43xDGWBJDZ3UaQVR5xoaNymXumNZ nnjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=g4ZZsynwQTcvHoBLIjcDjw43A9FRmZY0dyCIrQgSFkk=; b=N5jN8QWAMVa/kd3kiGrvsSJhCoLJLPaE6Wzzk/Y8dXjFaxT7rBtHrhaBHJLBo8lbFE vrmlLcYkTslx+oTiB++VvoIWMoJkicZshKSMnZhyPw1uyFRD8zMD7CYmcibWPDsqyr0X QjNfoddigPGEnePFFzXuWZSyTO2xWm6O1KSlqWvtjOOW5VMcaLt2JK40L5dvJnV4mGQg BabM3iOCrZ1xiYgmGNmgshxtHljlv06fuNbPtUBrwxBbmyAc2njNoz3Sny+81hAU9Uo0 spD4IJQbJsg4Yu3WnhC26A9TfsCIn1dM2SZrC7jno5ENY9qbXF3CB0kD3RIITS5ZcKCD Z//A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1evZLMOG; 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 y31-20020a056a00181f00b00562a1693523si18341475pfa.20.2022.10.19.02.37.57; Wed, 19 Oct 2022 02:38:18 -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=1evZLMOG; 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 S233479AbiJSJXX (ORCPT + 99 others); Wed, 19 Oct 2022 05:23:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233507AbiJSJWM (ORCPT ); Wed, 19 Oct 2022 05:22:12 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FA8D63F16; Wed, 19 Oct 2022 02:10:01 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 12ADA61843; Wed, 19 Oct 2022 09:07:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26D16C433B5; Wed, 19 Oct 2022 09:07:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170462; bh=XzQgB09SlnH/faR3zeTC49E6Tva+tqGeBKYN7Hl/Dcg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1evZLMOG7VafyY5fAG2mUTlRkZPg1BTO/Oe/yhkeLZsV6tNra577xO/RH2wArIYnP Tgk1xUwK0YeRwfnx4vv1sAdDA+JnAPR+6QZ5gBPTMD3fpbS4rLiqirt1Y/Xci3iqLK BvqeOAcfpQvLi5vPVsVsb3HoErtRyoEfFf1CXhdY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zqiang , "Paul E. McKenney" , Sasha Levin Subject: [PATCH 6.0 664/862] rcu-tasks: Convert RCU_LOCKDEP_WARN() to WARN_ONCE() Date: Wed, 19 Oct 2022 10:32:31 +0200 Message-Id: <20221019083319.310438424@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 From: Zqiang [ Upstream commit fcd53c8a4dfa38bafb89efdd0b0f718f3a03f884 ] Kernels built with CONFIG_PROVE_RCU=y and CONFIG_DEBUG_LOCK_ALLOC=y attempt to emit a warning when the synchronize_rcu_tasks_generic() function is called during early boot while the rcu_scheduler_active variable is RCU_SCHEDULER_INACTIVE. However the warnings is not actually be printed because the debug_lockdep_rcu_enabled() returns false, exactly because the rcu_scheduler_active variable is still equal to RCU_SCHEDULER_INACTIVE. This commit therefore replaces RCU_LOCKDEP_WARN() with WARN_ONCE() to force these warnings to actually be printed. Signed-off-by: Zqiang Signed-off-by: Paul E. McKenney Signed-off-by: Sasha Levin --- kernel/rcu/tasks.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h index 83c7e6620d40..469bf2a3b505 100644 --- a/kernel/rcu/tasks.h +++ b/kernel/rcu/tasks.h @@ -560,7 +560,7 @@ static int __noreturn rcu_tasks_kthread(void *arg) static void synchronize_rcu_tasks_generic(struct rcu_tasks *rtp) { /* Complain if the scheduler has not started. */ - RCU_LOCKDEP_WARN(rcu_scheduler_active == RCU_SCHEDULER_INACTIVE, + WARN_ONCE(rcu_scheduler_active == RCU_SCHEDULER_INACTIVE, "synchronize_rcu_tasks called too soon"); // If the grace-period kthread is running, use it. -- 2.35.1