Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp155165rdg; Tue, 10 Oct 2023 06:56:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGHGDcNwwtIXBBS9HNn/D0Um18z/lR52uLWEday6YQu3100iii/Y8eCtc85YIisOO/510MM X-Received: by 2002:a17:90a:31c7:b0:271:bc40:5097 with SMTP id j7-20020a17090a31c700b00271bc405097mr14627302pjf.30.1696946215959; Tue, 10 Oct 2023 06:56:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696946215; cv=none; d=google.com; s=arc-20160816; b=HNUGFjPfi/5IApqX0C7r11bAH6C5AXwb7ud1VuvWIH6wX1ZDvkp6JEj3bUKA3mAY6r VQr54OM+/05MgU6knXGHlnhbjOYMvto0tj7ZCN0ByDK3uCgvqYaW8HJlsrIxxYd5Y3Uf EMMychMrLECZughzGlp3JpgjevNI7gu8B+447CpD8hXRTyEi8PEg7YFFqCUHbhPtRxqJ AklrrtJF/BF5YyG0gro2/KbvK2UgIPq1FTjAOcumPOTkPAwvCqkwmvBzVAMDFw/bJm2M npTwWyrQBv2T/03AvJESwbqRC+rxgZOzyPTDUzM2jFUunKGPrIvOsaxd32dRtekuhq8O XLlw== 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=yzM3Uz074SljXj4pmHTYkGtTT8uBWay7nPkC46BqjGo=; fh=wGw97oo8b1VkFsTH68tf2S/1ckFQh32x7Ox+htlExmo=; b=Sd8yAF35n8bcu0qiT2jrWLaTGaHLMKx6aa4zLMs1crx3g2b8QIk42yoPvCz+aq6Qfg UeCZ1eHIfXI8wgfJ6/LBo+9ee3SLZXGfc/Dj1THZ6+hhO4T5v2AGWIANdjKQyhPI5KBl TQnZwFEG6MDNaCvzmqaFypSqx8t4Ds7bdEwYRUi20bkHy2uCg9tOsICSHIQFGRaxdHCA tPSxBaJBGkOA/LJJ9pfA/+h6HvpmpmeLbR7VnEpvwytEycfdeG3vfURp3/MNtjMAe2u3 spwI0wOWrWiUv8LSB3rMkddf2h/i3/aNgP8mugZYpUkqu9U2/H9aIu70jTpOfUvBdws5 b8vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="pZ5IVSp/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id gn16-20020a17090ac79000b0026376acd6fesi8035484pjb.22.2023.10.10.06.56.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 06:56:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="pZ5IVSp/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 1A2058086522; Tue, 10 Oct 2023 06:55:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232298AbjJJNzp (ORCPT + 99 others); Tue, 10 Oct 2023 09:55:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232258AbjJJNzm (ORCPT ); Tue, 10 Oct 2023 09:55:42 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC5A89E; Tue, 10 Oct 2023 06:55:41 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5121AC433C8; Tue, 10 Oct 2023 13:55:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696946141; bh=CAC3ydJqdRBVcEoBwK9bf67K3RO2fxSTF5IMiNQO4dg=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=pZ5IVSp/ybAsYDh+hx4w80XtSoyiLhJiumboqq+iPlqTNn9eJarj1uDzYk6xgiEbI Vq7fUkNTHi2wE15vKo9fwJMLyOXrDKf6/ULWdUShAE/fWprfbziD5D0yjxt6r4SwUn lV1RpCL0H681Q+gSiswgQUBR9jtF1gu0hZ9y8AheVt1KYKPnrf2HZU6HG6DAc1/i86 Qz7O3IIOJygTKD6ombCkvx6tYUwrDcrODM75WOX3m2CFQ3lL6FDISusfe7/4Mf6IiR irWI5sydAAFcpHqsOCjZgW7ImjbXEZSoxViPKsOR5thF7rH57nH+d6Cg6Q1DdAJymF sVlc3OdAYK18g== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id EB10BCE0C54; Tue, 10 Oct 2023 06:55:40 -0700 (PDT) Date: Tue, 10 Oct 2023 06:55:40 -0700 From: "Paul E. McKenney" To: Frederic Weisbecker Cc: LKML , Dan Carpenter , Boqun Feng , Joel Fernandes , Josh Triplett , Mathieu Desnoyers , Neeraj Upadhyay , Steven Rostedt , Uladzislau Rezki , rcu Subject: Re: [PATCH 23/23] locktorture: Check the correct variable for allocation failure Message-ID: <97ecfb49-e500-45f4-86bb-769b2d32e91c@paulmck-laptop> Reply-To: paulmck@kernel.org References: <20231010115921.988766-1-frederic@kernel.org> <20231010115921.988766-24-frederic@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231010115921.988766-24-frederic@kernel.org> X-Spam-Status: No, score=2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 10 Oct 2023 06:55:57 -0700 (PDT) X-Spam-Level: ** On Tue, Oct 10, 2023 at 01:59:21PM +0200, Frederic Weisbecker wrote: > From: Dan Carpenter > > There is a typo so this checks the wrong variable. "chains" plural vs > "chain" singular. We already know that "chains" is non-zero. > > Fixes: 7f993623e9eb ("locktorture: Add call_rcu_chains module parameter") > Signed-off-by: Dan Carpenter > Signed-off-by: Frederic Weisbecker Reviewed-by: Paul E. McKenney A name change to increase the Hamming distance would of course also be good, though less urgent. ;-) > --- > kernel/locking/locktorture.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/locking/locktorture.c b/kernel/locking/locktorture.c > index a3abcd136f56..69d3cd2cfc3b 100644 > --- a/kernel/locking/locktorture.c > +++ b/kernel/locking/locktorture.c > @@ -1075,7 +1075,7 @@ static int call_rcu_chain_init(void) > if (call_rcu_chains <= 0) > return 0; > call_rcu_chain = kcalloc(call_rcu_chains, sizeof(*call_rcu_chain), GFP_KERNEL); > - if (!call_rcu_chains) > + if (!call_rcu_chain) > return -ENOMEM; > for (i = 0; i < call_rcu_chains; i++) { > call_rcu_chain[i].crc_stop = false; > -- > 2.34.1 >