From: Dan Carpenter <dan.carpenter@oracle.com>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: "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,
kernel-janitors@vger.kernel.org
Subject: [PATCH] rcutorture: Fix error codes in rcu_torture_read_exit_init()
Date: Wed, 29 Apr 2020 16:22:35 +0300 [thread overview]
Message-ID: <20200429132235.GA815283@mwanda> (raw)
The rcu_torture_read_exit_init() function is supposed to return negative
error codes which get propagated back down the call tree but the current
code returns true on failure.
Fixes: e02882cd57e3 ("rcutorture: Add races with task-exit processing")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
kernel/rcu/rcutorture.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 269881e51dc6d..5270674128029 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -2434,10 +2434,10 @@ static int rcu_torture_read_exit(void *unused)
return 0;
}
-static bool rcu_torture_read_exit_init(void)
+static int rcu_torture_read_exit_init(void)
{
if (read_exit <= 0)
- return true;
+ return -EINVAL;
init_waitqueue_head(&read_exit_wq);
read_exit_child_stop = false;
read_exit_child_stopped = false;
--
2.26.2
next reply other threads:[~2020-04-29 13:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-29 13:22 Dan Carpenter [this message]
2020-04-29 15:53 ` [PATCH] rcutorture: Fix error codes in rcu_torture_read_exit_init() Paul E. McKenney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200429132235.GA815283@mwanda \
--to=dan.carpenter@oracle.com \
--cc=dave@stgolabs.net \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=paulmck@kernel.org \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox