Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp402531lqh; Tue, 7 May 2024 02:45:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWvZAokvi94LH127MtWqAzdU+vwW+9KaenI5WiQcOwk8zBTIEYxlIoVjwsOd6O2bQZ7dXTrTAnkwpXespiNJknfPQ7cJoAsQmGQa7w6Hw== X-Google-Smtp-Source: AGHT+IEQp/gB6tcgUgX5y3WZjq/CS0fOBJ3l7G3YcNgxkhNFAhWI6cGxrhJ1MfetLW+KgnLiaaoH X-Received: by 2002:a05:6359:5a8f:b0:17c:308e:2154 with SMTP id mx15-20020a0563595a8f00b0017c308e2154mr10543818rwb.18.1715075124898; Tue, 07 May 2024 02:45:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715075124; cv=pass; d=google.com; s=arc-20160816; b=o0dwOpka7xm5SZNfNsVRDkL7hXWHoSMlLxQAi30UTLuWcvE7U+5aAOx2uEDxAQfdFs am6hfPw5rICWeUAkNRG8S6JqpMtB/cX4M0eeEw+DBwdwUD1YU/SHLfcmbKj/LEsxRlJx qrGKR15tTJuDrflXs530aYayhD4UZLNVcpksReyGkEbDh30fUZ1zodTgW/4u/fMRGdoT OqH9SZeP/3U5a1CvGT2oig/0DhSb3uh3/VXu1HOuOAF+IDG/y/q0wRRSo2Ffx8KoB+ip PYfgAcf4owMmcap8WN0YXMIR+71EAQWJ5rWl1ACt47ybg8Q+UYra7Er3iYrOQPMgA1e/ YCCA== 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=CKbmQWc+9T9jJILreLJTePG04vL0LrIDb9GwepNxo3I=; fh=Ov6Io2tAqs+gKGQFMHui4MJmGGbb3tJ9kBaxASSrodM=; b=USLTzL2uXMLquI2w9DCkgj0PWcIzNIXSpxdNBmNpq+yDWxudjuQMXjpUv5GbLUp9Cg lTvZNxvuosOHmMsoT8gIaIVlRFxscUiZGJqOsZjwFvY7MEM2TwPC/zyRA8lTj+2JuGyb Xf463PgZM/t2g9g8Ty/xe6zRWE7CNieyQDaW+D3Iu59c0gyRY430vIfMIbLr4E6uLx0F v9WJvf6g++5kXPKw3qmd0oh5w5OvOzp1vwn4cKNt0FlA/RQsVyLjECIdjRSdiCBh6pcj h38YVEiDDyrdNAxj2ZZCGxe4ZPueE6+l74bq+goc9stl6VmZZK+6eLYTQVNqJDfLqWa/ LfWA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=KzKq8LMB; 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-170998-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170998-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id bf17-20020a656d11000000b0060b5ab269e5si10267242pgb.759.2024.05.07.02.45.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 02:45:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170998-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=KzKq8LMB; 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-170998-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170998-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id D2609282FEE for ; Tue, 7 May 2024 09:44:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C94DA168B0B; 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="KzKq8LMB" Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (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 4B42E1607AD; Tue, 7 May 2024 09:36:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715074576; cv=none; b=HQyr6P75Oh/Bii6zt6nS+1J29hEPRVpWvOZ/xG8sW+9CZ+YJ6h9nB/MNH16ghIckVlDcGpc0OI7Uh2vL018m3WlFNfe59dNhlIxQGPMrH9yFOgknle78ibNQpJexDwPQwrCBk2CCEYxVla7WK/Wctj6/X+/UUyZGgYpzMSy381E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715074576; c=relaxed/simple; bh=xpb7OlvSSo1eFdDyHPiIjhWcGu0wWewuK+3bzuPFsbU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=oDx7E6bIIuJZAPkkG3+qL1D4xxwT8nI3YZ6tLTT8tp37DLR/T/O+wUnBQ+Jexg7Cc1cseGzrMIFcjk4tcZZHsz4kTNwaj36yk+5/5trXXJgtMZVn/vSepL9PNW9Lrh23TWuAwdr3iGjcnDO5EPIe4uhKxJ8rLrtCan6HpKWFFEs= 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=KzKq8LMB; arc=none smtp.client-ip=209.85.208.177 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-f177.google.com with SMTP id 38308e7fff4ca-2db17e8767cso36158051fa.3; 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=1715074571; x=1715679371; 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=CKbmQWc+9T9jJILreLJTePG04vL0LrIDb9GwepNxo3I=; b=KzKq8LMBOt+2tgNLhCa41kfA9tIxfLFoR2sL0JVEa6uN6iTYBMsCK6FweM2rBql4+B 5UiZKHKfjBRH2yslcqM/RgqrfLiL3ZIuWh+8VnH0RuVLrCZGPT0eDFqRX4+uz3groWgb rfW5EeBVHFDYHrJE7U0+vYvl5giAzeCgM0fZT45pQhEfY9N4T+5+XxiPFyAbcsVtMlDy gaD4ZjEGWGkFQKY9FOxf5u1wT5EAT/JtmWKFbFZVJHrzwV7dPRPutvfoQVyHEBYV3B8s jyI/hPUAL8N1edfBSf4wygl9iyClVkDc0Is2CdkrMWJcANQQOPr8cRIkcekcxloIyaHM ZDNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715074571; x=1715679371; 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=CKbmQWc+9T9jJILreLJTePG04vL0LrIDb9GwepNxo3I=; b=WZevy3W2ZuRDRev0X3ou525e5aT+jyUMZG0YxDwqzZ1ZLWxXdyo8fz8ZSxA3EXhEhZ l6IStfPQz08+uJJBMTRAGi0uYDgZKEVF4AHw6+Kx4lclntt8MSOmQr22TegL7/QUr2My rMJWVgkBqdbgLCMbnsuNkPZbajpsw625orH1qYbaPnYpEpg9M+Hpj9Czd72fZk48F0F/ j49jaKoZlnP7T/z/7Sms6bWZfSfclrsv/69KuQ4r8/d8bZy4UlYsapyiO4Sdi3soMArU aQekBuPkpKdrCybZJL04+5Cq+LC5c3hpQklF6ptzC/NTQDbuQwTLK2wlDn1+WzcIxDh9 Wz8A== X-Forwarded-Encrypted: i=1; AJvYcCVeYJz7bnynwWwl1mK662tU4C35a3al1+yODJCkP2ic8mhUAuCzIL8tXjtmhG2UCctitt78Pyel0ynY4BQwMY1eyi6i7KivEcLmNBFh X-Gm-Message-State: AOJu0Yz79mz/KPzjKFvDd+e31kefFhVkeJZ0GILW2DKb0Kh/+cXBQGjQ BTjWUZzyKUpvWCVtcM6cb7ZXqj8hzV8yu28OaM6GuMAjSqcpRrPK X-Received: by 2002:a05:651c:201c:b0:2dd:c9fc:c472 with SMTP id s28-20020a05651c201c00b002ddc9fcc472mr7408812ljo.26.1715074571380; Tue, 07 May 2024 02:36:11 -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.10 (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 39/48] rcutorture: Remove extraneous rcu_torture_pipe_update_one() READ_ONCE() Date: Tue, 7 May 2024 11:35:21 +0200 Message-Id: <20240507093530.3043-40-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 rcu_torture_pipe_update_one() cannot run concurrently with any updates of ->rtort_pipe_count, so this commit removes the extraneous READ_ONCE() from the read from this field. Reported-by: Linus Torvalds Closes: https://lore.kernel.org/lkml/CAHk-=wiX_zF5Mpt8kUm_LFQpYY-mshrXJPOe+wKNwiVhEUcU9g@mail.gmail.com/ Signed-off-by: Paul E. McKenney Reviewed-by: Joel Fernandes (Google) Signed-off-by: Uladzislau Rezki (Sony) --- kernel/rcu/rcutorture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index d8c12eba35b7..6b821a7037b0 100644 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c @@ -461,7 +461,7 @@ rcu_torture_pipe_update_one(struct rcu_torture *rp) WRITE_ONCE(rp->rtort_chkp, NULL); smp_store_release(&rtrcp->rtc_ready, 1); // Pair with smp_load_acquire(). } - i = READ_ONCE(rp->rtort_pipe_count); + i = rp->rtort_pipe_count; if (i > RCU_TORTURE_PIPE_LEN) i = RCU_TORTURE_PIPE_LEN; atomic_inc(&rcu_torture_wcount[i]); -- 2.39.2