Message ID | 20240227102222.29584-2-d.dulov@aladdin.ru |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-83029-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2606748dyb; Tue, 27 Feb 2024 02:27:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXxRRj1EFQl/icrfKteiA4fivkcgQSHMd/51/y1uygg5t0DaHWJVQpPWIQ7XDTX5iPAe8pnpZO6/2PdL2n3CtYUzWAQSQ== X-Google-Smtp-Source: AGHT+IE5g6ciwgBssLGighP4LVD8PrZhZrxVMNQZGs8cqdf40m1/8a7CbwC0gJ3Pat78mOWxzXK2 X-Received: by 2002:a05:620a:20d9:b0:785:9584:a080 with SMTP id f25-20020a05620a20d900b007859584a080mr1609877qka.58.1709029626697; Tue, 27 Feb 2024 02:27:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709029626; cv=pass; d=google.com; s=arc-20160816; b=ofv/BO6q0jt41PD8jAxjL3AylKRFNTB5ssJDx+whCW77Xx7Yc5ws3JH9F1nKhOrF2d bmZcC6AvKzi7e5YdJK3QjJhcz9YvsBm0sPBSiEOLG06ZDv85L+wPjlK6Bi1L0xiKgPiN VBTVrYjv+gBYmUMN1D5se3x/gUg/lP9qKGQ/aE5R+zRBpzfCaFOV2swyGP8QupcA7/D7 NYp+kjLjqF5jc6MDZCvF7gjr3gWawpTSGrNnyaktZAg5yf+38YFHgCkErjKQr7lNy21M 4cmv5a0PgGj6gN5aW9acIAK02uWmYiD3Dqc0gikhuXgIujD0CW/8vIzFhpAOJP/Sb6UG F+xg== 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; bh=WZZZyKeu9n8WILZ+w+0YzO/xNFZ81j5c8kmRUUky8gQ=; fh=9C2Yya9gmg/NP4SjFJ4yN8nHfFLYOaIarW/WPY7hQ44=; b=UDEaeh7CFQ8g/LAKR9Syr4NjLi6sGAnHf3sIBQ5lFCNp9BxXipcE2OhC7U3K+f2Jje wTMQJwibQHg0aZV0gu8qjdWIp3uo9ZmLnrL/fn2Ec6jK5O04VEWppZ8a4ugHHmif/ipE Dayh1HNOAYH6NmZTctT0DIkL/8Ebti9sU+ttJDDymel/qkoExGPGQvUlElMSySO9K4WL eummNAe3o13CVJG3fMcjgpk77/Fb9hJ7WvYkyMWzvIvE6eFSv27VuJXHUZol8L7mFxRM nmtXJ4HSDQ8QoFKrFVVS2La2QuY9l73DREjI5N/hBT6ElP4y/TZIJJnnEIPzX2s2R38Z kSWg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=aladdin.ru dmarc=pass fromdomain=aladdin.ru); spf=pass (google.com: domain of linux-kernel+bounces-83029-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83029-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aladdin.ru Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c22-20020ae9e216000000b00787d4c7ead6si3664307qkc.322.2024.02.27.02.27.06 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 02:27:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83029-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=aladdin.ru dmarc=pass fromdomain=aladdin.ru); spf=pass (google.com: domain of linux-kernel+bounces-83029-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83029-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aladdin.ru 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 753C81C23911 for <ouuuleilei@gmail.com>; Tue, 27 Feb 2024 10:27:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 29D191386B8; Tue, 27 Feb 2024 10:26:43 +0000 (UTC) Received: from mail-out.aladdin-rd.ru (mail-out.aladdin-rd.ru [91.199.251.16]) (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 A3D2213849F; Tue, 27 Feb 2024 10:26:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.199.251.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709029601; cv=none; b=FwO8/XnsMtQMbO3nMQBLQql5b025gPMJuX2qw2Bn7ciRa00TSH/XY9V0cEhfYm/JZo7UFU2F/WM8zGSj++kfQHIF5+efFp66qRHQauuSD/JGO1e1IP0FlEOpL5T6VqtcqHQ/Yq5ksIl+Pl83UnipeP8pog9vG5i74l6sahLw7s4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709029601; c=relaxed/simple; bh=2V6msSSOGznnB/lFtzfEFRZx43Zk7T3DtjKa16ZisKg=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=rI6n4HaWk9zcqCVYJhGdoSrwYR8bDuy0Me4D46Pm4JIvDvaBkxNphD/+6cUD+gTURRE5Ya6xfGTNjRU+UniGOIOaj4BWgSmVi2NaJ4/BGBZg0cCrarpY/WESPCmd/BrZU4eg2ksc6N1XxdSYbrCv8ShrVkteLeBKf27vfZIArQ8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=aladdin.ru; spf=pass smtp.mailfrom=aladdin.ru; arc=none smtp.client-ip=91.199.251.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=aladdin.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aladdin.ru From: Daniil Dulov <d.dulov@aladdin.ru> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, <stable@vger.kernel.org> CC: Daniil Dulov <d.dulov@aladdin.ru>, Davidlohr Bueso <dave@stgolabs.net>, "Paul E. McKenney" <paulmck@kernel.org>, Josh Triplett <josh@joshtriplett.org>, Steven Rostedt <rostedt@goodmis.org>, Mathieu Desnoyers <mathieu.desnoyers@efficios.com>, Lai Jiangshan <jiangshanlai@gmail.com>, Joel Fernandes <joel@joelfernandes.org>, <linux-kernel@vger.kernel.org>, <rcu@vger.kernel.org>, <lvc-project@linuxtesting.org>, David Vernet <void@manifault.com> Subject: [PATCH 5.15 1/1] rcutorture: Add missing return and use __func__ in warning Date: Tue, 27 Feb 2024 13:22:22 +0300 Message-ID: <20240227102222.29584-2-d.dulov@aladdin.ru> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240227102222.29584-1-d.dulov@aladdin.ru> References: <20240227102222.29584-1-d.dulov@aladdin.ru> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: EXCH-2016-04.aladdin.ru (192.168.1.104) To EXCH-2016-01.aladdin.ru (192.168.1.101) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792047440547941327 X-GMAIL-MSGID: 1792047449695403799 |
Series |
rcutorture: Add missing return and use __func__ in warning
|
|
Commit Message
Daniil Dulov
Feb. 27, 2024, 10:22 a.m. UTC
From: David Vernet <void@manifault.com> commit 80dcee695143255261f30c7cc2a041ba413717a4 upstream. The rcutorture module has an rcu_torture_writer task that repeatedly performs writes, synchronizations, and deletes. There is a corner-case check in rcu_torture_writer() wherein if nsynctypes is 0, a warning is issued and the task waits to be stopped via a call to torture_kthread_stopping() rather than performing any work. There should be a return statement following this call to torture_kthread_stopping(), as the intention with issuing the call to torture_kthread_stopping() in the first place is to avoid the rcu_torture_writer task from performing any work. Some of the work may even be dangerous to perform, such as potentially causing a #DE due to nsynctypes being used in a modulo operator when querying for sync updates to issue. This patch adds the missing return call. As a bonus, it also fixes a checkpatch warning that was emitted due to the WARN_ONCE() call using the name of the function rather than __func__. Signed-off-by: David Vernet <void@manifault.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Daniil Dulov <d.dulov@aladdin.ru> --- 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 d820ef615475..a76399bd43b9 100644 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c @@ -1165,7 +1165,7 @@ rcu_torture_writer(void *arg) " GP expediting controlled from boot/sysfs for %s.\n", torture_type, cur_ops->name); if (WARN_ONCE(nsynctypes == 0, - "rcu_torture_writer: No update-side primitives.\n")) { + "%s: No update-side primitives.\n", __func__)) { /* * No updates primitives, so don't try updating. * The resulting test won't be testing much, hence the @@ -1173,6 +1173,7 @@ rcu_torture_writer(void *arg) */ rcu_torture_writer_state = RTWS_STOPPING; torture_kthread_stopping("rcu_torture_writer"); + return 0; } do {