Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp79703rdg; Tue, 10 Oct 2023 05:02:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEndO67hCzJcKeK2pTXfmK0sCfgPbkLmbc4EHqXRX0MAhN93jpMFwiPGBK/OQzCebjamb+O X-Received: by 2002:a17:902:be03:b0:1c4:c5d:d7fa with SMTP id r3-20020a170902be0300b001c40c5dd7famr14002506pls.45.1696939347269; Tue, 10 Oct 2023 05:02:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696939347; cv=none; d=google.com; s=arc-20160816; b=QPqFXV1+PyKu61wKwdnS5luDTPlsB9ut247HaoNyGZFEnapBk2AZepwoAZ0mgD/7C+ z7D/bT/RwUFUlfU0aJCPVP6NelzHcVZkDP1/QRnzFCrKjdHuGSQueuS02YE/I3RH4lKo 4eSROkxokPHMaPE6dCEF7vM7ZOQ/BbKVyKJXoyWVjECt9PqGt7ni1kFhVQjXFshXT7Ya R1C7bIWF6XuNCVE2ktc86An/x8x65y8j5H77AL9YBalCMxOVvdKBnvUw5jaJY9ZakcqC NA/4l95CZgc4TMqcnocUsARLepPPcIkWC595/ma0TxB3IPlMNOWWkKHEmyXMA16YN+M+ EHYQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yD83G4ectQwwXXmlG7UYsW94ISGfL2Bvbl/krVDfQv8=; fh=STt8ARl3+MaHAPfeTw5U30HTakllX6RPNp8PMB4dgwE=; b=nmCcNJahVlLQzVZu29b0wx0O3Xr9ZTJStLL/nmbiv6M17RV6k+Se37TpUGPCOmWRUR 1PGAsprNTreVRGzHFjIW19kN+zXMXVJUr+cnRIktgjC2JJ3EwoFd89Ew/kXxwDSVYg7e OwHHn/7/+pTfztMuKZHl5h9JmU2AInOxpXhmHWUzPHbLMkAbbQASzKv39HDudlyI/8Rp 1KbFgYcRztU0UmaCgIedeZqiIQlwceKXl2HqsHmBdu5eDBl/Fe8DTlhpotTs8003ZlRV 7xTly2b/Q4DTC71ghx9eucxoDSNeRDjxPgRp7OJ+hys/cNiPzDTUet83VpCNclu2CZml TqFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NQofG2QV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id kf4-20020a17090305c400b001c3e9b0bae1si11303515plb.443.2023.10.10.05.02.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 05:02:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NQofG2QV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 84A59802454D; Tue, 10 Oct 2023 05:02:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231964AbjJJMB6 (ORCPT + 99 others); Tue, 10 Oct 2023 08:01:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231908AbjJJMBP (ORCPT ); Tue, 10 Oct 2023 08:01:15 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0971318F; Tue, 10 Oct 2023 05:00:38 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 24D99C433CC; Tue, 10 Oct 2023 12:00:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696939238; bh=PuTfWYxQLhTAjaDvea6gKVcCYIdp2RUj6VBNyhU8ZZo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NQofG2QVvUNyK5e1afjaX2K7+wJsDecGoeF2EOLKc1waVTQ2NUQR5M2tub1kMSWDZ tBofVRWhX+fs3G+Ey9mIwSnS8LxfdHUSYCGPbtILiVgY/8JKMEONZYjY+fkKxCnpJF jrETXvS3AoL2MJp2xYkVVgxUD+ZyJILy6jtaesiu6MF1XxzU6VXaZqkQSZglY3nHX7 YJMQsVBQth82iwIHaXHtRiusoyP2hztsfrBwvVfzGUd6mcq04d3CVg9k/6vpbz5u+L 6FMnqpPmyx2C7UzFC5EZexPqCQniTa/NoR6xzlg4zKKQvR6g/Z19zP9rQMwljJgYV+ kaQtxp+EZhAyw== From: Frederic Weisbecker To: LKML Cc: Dan Carpenter , Boqun Feng , Joel Fernandes , Josh Triplett , Mathieu Desnoyers , Neeraj Upadhyay , "Paul E . McKenney" , Steven Rostedt , Uladzislau Rezki , rcu , Frederic Weisbecker Subject: [PATCH 23/23] locktorture: Check the correct variable for allocation failure Date: Tue, 10 Oct 2023 13:59:21 +0200 Message-Id: <20231010115921.988766-24-frederic@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231010115921.988766-1-frederic@kernel.org> References: <20231010115921.988766-1-frederic@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 howler.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 (howler.vger.email [0.0.0.0]); Tue, 10 Oct 2023 05:02:18 -0700 (PDT) X-Spam-Level: ** 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 --- 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