Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp618063rdg; Tue, 10 Oct 2023 23:46:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGYx76EuMgnhNdhDGgKxnRxqjmDYEszIU3/2+8c595MdbttRb2dFixN+GiKB7ukkRJm+gPf X-Received: by 2002:a05:6a20:3943:b0:12e:caac:f263 with SMTP id r3-20020a056a20394300b0012ecaacf263mr25976262pzg.20.1697006805663; Tue, 10 Oct 2023 23:46:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697006805; cv=none; d=google.com; s=arc-20160816; b=VGWY/Vktkya0EUSk2g6GGhdM87Vy8btpYc2vssGs29iNj3gbZOfIxW0aCHE5t4vJRN oFPHIz+X4Q4YlPM+CQqOXQZQiMJfIsipklitr8eKW2c5etV0lHl8l34CBbokLGCFvmAf W6nvmLt053nqkJbg59EpWhgIHP0zyCmZjbZEfZfTLyMqJLmQHxn+NN/waUeM10mBHj48 2/VS/xip26PAveX3ziEaEufSwxW9UrCHoryLyproE0r7aYxTTi9pMdffVIk6Q0P9h1Wo wpBTjye6pt17npbAnDsf85XCJg1YNYRfHtA2UMrFga9YYReBiGrjIEOurkAa0mPB/Ry6 4u8Q== 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:dkim-signature; bh=CwtA+hno23ELHNqbl06IpWLX/dKD8muoo0IC8mLLZDs=; fh=rTV0uGAokNKUwwXRpCz/gbD+x0pHo1fj3u1T9ODpcTI=; b=XPOhhAdw4u5ttMnbAB8/ZvENmSUbJrUjFcDwsVJ+DJ0yRdTclWLDP6iSc3Q990z5Px SbBo5Na1qQh8AO2M+EUJcQhKPPfVYLcvGGpJlLGay3tovxugnG97OmUepJvK+l20kiar 44tPCSdq2PtJDHKJ1Zpz7eXJAmgPASXGxHdV321lt6gupra3xsq0asphKgqvM0ciWs8W tC1+XMgldGA11KjvJj8SvhzWbJ2m+BdZydx4Vcfw5lcKu0pSxrjHHIRqQLdHAHcqVCYL kAiGbfSaKamzg1CgscU9meQ89s2tKOUSbQ7wDJRg9umk9cZKF1+wCq5VT1PDLJA0LOo3 UsAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Wh7jt5OV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id a185-20020a6390c2000000b00578d08489a8si13399449pge.832.2023.10.10.23.46.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 23:46:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Wh7jt5OV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 358B98056C5A; Tue, 10 Oct 2023 23:46:43 -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 S1345300AbjJKGqe (ORCPT + 99 others); Wed, 11 Oct 2023 02:46:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344451AbjJKGqb (ORCPT ); Wed, 11 Oct 2023 02:46:31 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C28A09B for ; Tue, 10 Oct 2023 23:46:29 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-31c5cac3ae2so5858328f8f.3 for ; Tue, 10 Oct 2023 23:46:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697006788; x=1697611588; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=CwtA+hno23ELHNqbl06IpWLX/dKD8muoo0IC8mLLZDs=; b=Wh7jt5OVdvndEZDab8c4hvet/m6H+0ISHUosEUx5BPk+QN11+DYeYxqg6jX8AeugsZ 0E2rSJiFspE4Nn7U80wbUWk2MVjo77j2xRHQbdaONBMQqcAx1IqBrEZ3eWtgcgzrpnEU 2e7p1bYrLGMwMWePLTBtnoL82BdPrQY+lsvf/WB9FE092EFjHGbGu2i2CCIWIjThRoQo 2K1Y3KWGC053qyB92of10nf2pvixAKQ52uUmOEKpBF/4vLz1vhn6fms4h9mdD9XOO8s/ jkq0kbq7s+vRmjKV5dPWGekMxYH1QYqd2aHF/4IjkZzhdbPh+hRFz+cz/LZL3CFFKF7x 2MFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697006788; x=1697611588; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=CwtA+hno23ELHNqbl06IpWLX/dKD8muoo0IC8mLLZDs=; b=cLfYFMx1wGOMM4UwUy36SpW6NsbIpANfVeCvE5Tws7YXKaR2ZuZyYLzEk25MnM8GEX i5XY6o7kACGLC4a9DSB3WuxND6u3xTB6BjgJUADPsvOeVLXWmm0u/dxvQEdih44PA++K kKrPKBIeL8pRaeaeoNeRZf4S/a9exdCJkvEIBAjbpZQS42XID1ZKgyJ3CFDHbszCVMbO k6PasGpFRK3n7RzGsYUrSLz5PjWmk0UiPCLMRUAcR7AV/L7IJH5DVEQbkERptljYKY2S D2e9ehvckGEave2QNOz4oaxDIbjZzyTSZExnxhgxcp+i99vUS3Su+EqkMM2tPu/aqbZM 3szg== X-Gm-Message-State: AOJu0YyYI++go7ZGVBri+1G+u69C/sLGaoOwzcCqHEJmH14nK971Cuk8 qH60wBccwFBGL9HJT2DfYAE0jQ== X-Received: by 2002:a5d:4f8a:0:b0:319:7722:30c with SMTP id d10-20020a5d4f8a000000b003197722030cmr16162137wru.22.1697006788180; Tue, 10 Oct 2023 23:46:28 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id v26-20020a5d591a000000b0030ada01ca78sm14485129wrd.10.2023.10.10.23.46.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 23:46:27 -0700 (PDT) Date: Wed, 11 Oct 2023 09:46:25 +0300 From: Dan Carpenter To: "Paul E. McKenney" Cc: Frederic Weisbecker , LKML , 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: <029de83a-dcf1-439d-8d6b-7267d2636e37@kadam.mountain> References: <20231010115921.988766-1-frederic@kernel.org> <20231010115921.988766-24-frederic@kernel.org> <97ecfb49-e500-45f4-86bb-769b2d32e91c@paulmck-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 23:46:43 -0700 (PDT) X-Spam-Level: ** On Tue, Oct 10, 2023 at 08:53:36AM -0700, Paul E. McKenney wrote: > On Tue, Oct 10, 2023 at 05:07:00PM +0300, Dan Carpenter wrote: > > On Tue, Oct 10, 2023 at 06:55:40AM -0700, Paul E. McKenney wrote: > > > 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. ;-) > > > > "Hamming distance" is such a great phrase. I'm going to use that every > > time I complain about confusingly similar variable names going forward. > > Glad you like it! > > But the horrible thing is that I first heard that phrase back in > the 1970s, and I am the guilty party who created these particular > too-similar variable names. (Why has the phrase fallen out of favor? > No idea, really, but one guess has to do with the fact that current > error-correcting codes must deal with different probabilities of different > bits flipping in different directions, so you would instead needs a > weirdly weighted variant of Hamming distance to accomplish anything with > modern error-correcting codes.) > > But how about something like the following? > Looks good! regards, dan carpenter