Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp402056lqh; Tue, 7 May 2024 02:44:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWeS4LrB4Xb37FgL8PIedn/kyU1YpyN+OwsW0rfz2lJv+cNKucb7AfkmTQkhYiPOiWYYdF1pH2qhKw0VdLVw8CRyMoifStslEeb/o/7Eg== X-Google-Smtp-Source: AGHT+IEJ3Mtq5RAUu4MM8FECCLctIEZh1KWgS86nGdThhnwZ0RXf09dNe6hrsUJrTiOrNi3XMSTL X-Received: by 2002:ac2:4157:0:b0:51d:9aa7:23e with SMTP id c23-20020ac24157000000b0051d9aa7023emr9332568lfi.65.1715075063598; Tue, 07 May 2024 02:44:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715075063; cv=pass; d=google.com; s=arc-20160816; b=w39z7zwb77mY0QPeKD9PRGR1BXzcG6O5kVRHPGfXbnOxAif+ctuHpXDfqst6dkOAxZ tjjW3qZMkWZ7AD4gauekm0Cd7Xu030hq+2caIpQNaOnRrUBbrAOtXrfR7UalK9snWnEf ZWNFEk1DnYRz90PgiHWeTRDIbv94ChJClv8IXOA5ecT/Oir4I3yYE5sgGsoJRb9ZytJw 3O6ka9DeWN5+m8tNfQJOPyyhd8ReqXCpv87PzvqY/CW/iX9SvVAXPESqL/Gby7FAc4tz 3q4vt+63wrQM5jQOJ5C17lMSsrj9hDI3HQaYiu0xic30qj0H+NCHHDVa8TEg488FRAaI cWbw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ALGD50dfBLDLVyD3Lt2LManagWExKBPG3j+4x0bgOm4=; fh=a6vRmzvaJTVNsS2Qo4+CJ7CC4vgRZWIMSFBsp1jeuCU=; b=eVfUoDNuQkLh3Y6JwlqzaaouMuBxDKWPdcZKUbIO3IpwCykUyPJEd9soMB27w5uXa6 M2Fm1xTdunALQxH/zWTBxjsiAceg/qHwimfNg40NdeZY3hcUtIfk6gk7hKA5olh/191Z Qt8PPDqE33qUWkpuIArdu7qQjsU6OGTtxvwci0PWphxcd+TBQPOKW0gnP6CdrYI2Q92f jRA5DgPEG2W28i4iy8w95Ys5jffA71+RQ7a37dj0I2kkQQ1bXBjB4975uxl2FGxfYx5S Wsa55u7WV4/iGM+KeIj6WLmDnBgQiyqwDt2jRfunXh3z30c8izuSN/AaSBdX58xeGTxa mcCQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=OmlFqxHR; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-170996-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170996-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id by23-20020a170906a2d700b00a59aa19e286si3721035ejb.381.2024.05.07.02.44.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 02:44:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170996-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=OmlFqxHR; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-170996-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170996-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4FCAD1F21588 for ; Tue, 7 May 2024 09:44:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2FF7D165FBB; Tue, 7 May 2024 09:36:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OmlFqxHR" Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 492EE16132A; Tue, 7 May 2024 09:36:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715074576; cv=none; b=eLScoywT3IiCVcGdudtka9etOgJMH1S5JzXyOAEodHFJuVJSXfstqF2JNQML0iGRJwZueItSym5tdLRxEhBtTyEWuUOmxw3QYfOLd3SjnHXejOM6ceROulHcFTO8eMl49dgbe9v1Nb+eYRWBQkx8NONzZ+8a9WgliO8RBFrf8TA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715074576; c=relaxed/simple; bh=zwo8GaVLL+3hw0Cv/JQfcpn/MdzBC8bJdprk9Rpnixk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=WTKRa95nPxIXeZdFoyY0zq+kjGIoJvDiykWIH1ZnXeWcInKESF9OXjhvhCI2zK6u9gRIYvidpm6G8kum3ajcb2FpSCP6luljIb9zy1HDyAYu0VtX10GCk59vMnAHbKuHQPtf6eoV6tTlWaNY1t6wPzRhGngjXUEo9GpTERJ0v+I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=OmlFqxHR; arc=none smtp.client-ip=209.85.208.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-2e1fa1f1d9bso55712111fa.0; Tue, 07 May 2024 02:36:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715074572; x=1715679372; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ALGD50dfBLDLVyD3Lt2LManagWExKBPG3j+4x0bgOm4=; b=OmlFqxHRQB7f/Q5CnuQ5h25j29eEJY70I8EwbfW9QC4ZMqIfW0n97Q2GyH6yhLBiIJ btyWzjsgbe325QjS+d8Mj4NITSmANzukzRjHBsVCHShzOXHp+aeIRb9dLmDtA+DKTYjL ObEzVh0denAbbR87P9xpT9flHWUHfsQjlyfmZoyAh/pEo7+HlboMUQ2ixTsKt0OMQZld 7++H0WLtFDZF+QBNbq7fhlxF9eduP3eYQDn/hgcxzaAlC4vIAYZ2CxRUgraMCdidmoac vmlFvh1wkHcp/fhNFWPY58uad89emWN7BlsRStn6TDSsGL5PV0wQjlTN3xop1G/t8CbM +BCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715074572; x=1715679372; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ALGD50dfBLDLVyD3Lt2LManagWExKBPG3j+4x0bgOm4=; b=vyM6BJ9KdmLo+dl3iUt4x55bQ51N1H4SKG17I+Dx/FSofBj3GN5rlf23YWLlGp8JrN 3LNuODvb5Hc6tEEp0rk1sXS3u0gdPj799+Yb5VSs8k9FWb3SmbOylUC71AhIMBOLAuAB FrjsvVQBIOJM/NaPRS0fli78pn8RgYuPuHyvll1FzIkyhUNqDdkRdR0pjuDLQGLrMlLS sQ/W3EPfvI0EyRsKJot0o0jwiDSe7tqokEgZIEouC278aOvcXyc3OxP69A9zBw/Md1BW 7TKu3VmBtL0KTpsotSKN1wqslKtahzifZMa7H1qNzOekrHG/NU9nnMLL6rFGHNAdaa7f 5W4g== X-Forwarded-Encrypted: i=1; AJvYcCXFY64HWFHn3N9goTtcBfF5fci3NXvDPUjALwpoXytY02zSotEpIndJpRmPhkUJmTgRSFgxRsjueZS5ZTDmuHVJ+CzZ0kdV78QVxQLx X-Gm-Message-State: AOJu0YxhRd0cKzDjE5qLQvz7F8uZeRqrjoZsAPA+C0By1UXX5SaGx+cS 5C8XJnOnxVoWgolTHWC62v9flp15ypa4130Hf7mCgfuhokDs2nzl X-Received: by 2002:a2e:984c:0:b0:2e1:d94a:771d with SMTP id e12-20020a2e984c000000b002e1d94a771dmr11437082ljj.4.1715074572233; Tue, 07 May 2024 02:36:12 -0700 (PDT) Received: from pc638.lan (host-185-121-47-193.sydskane.nu. [185.121.47.193]) by smtp.gmail.com with ESMTPSA id t18-20020a2e9d12000000b002e29c50c4dcsm1335473lji.27.2024.05.07.02.36.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 02:36:11 -0700 (PDT) From: "Uladzislau Rezki (Sony)" To: "Paul E . McKenney" Cc: RCU , Neeraj upadhyay , Boqun Feng , Hillf Danton , Joel Fernandes , LKML , Uladzislau Rezki , Oleksiy Avramchenko , Frederic Weisbecker , Linus Torvalds Subject: [PATCH 40/48] rcutorture: Fix rcu_torture_one_read() pipe_count overflow comment Date: Tue, 7 May 2024 11:35:22 +0200 Message-Id: <20240507093530.3043-41-urezki@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240507093530.3043-1-urezki@gmail.com> References: <20240507093530.3043-1-urezki@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Paul E. McKenney" The "pipe_count > RCU_TORTURE_PIPE_LEN" check has a comment saying "Should not happen, but...". This is only true when testing an RCU whose grace periods are always long enough. This commit therefore fixes this comment. Reported-by: Linus Torvalds Closes: https://lore.kernel.org/lkml/CAHk-=wi7rJ-eGq+xaxVfzFEgbL9tdf6Kc8Z89rCpfcQOKm74Tw@mail.gmail.com/ Signed-off-by: Paul E. McKenney Signed-off-by: Uladzislau Rezki (Sony) --- kernel/rcu/rcutorture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index 6b821a7037b0..0cb5452ecd94 100644 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c @@ -2000,7 +2000,8 @@ static bool rcu_torture_one_read(struct torture_random_state *trsp, long myid) preempt_disable(); pipe_count = READ_ONCE(p->rtort_pipe_count); if (pipe_count > RCU_TORTURE_PIPE_LEN) { - /* Should not happen, but... */ + // Should not happen in a correct RCU implementation, + // happens quite often for torture_type=busted. pipe_count = RCU_TORTURE_PIPE_LEN; } completed = cur_ops->get_gp_seq(); -- 2.39.2