From: "Paul E. McKenney" <paulmck@kernel.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>,
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: Re: [PATCH] rcutorture: Fix error codes in rcu_torture_read_exit_init()
Date: Wed, 29 Apr 2020 15:53:26 +0000 [thread overview]
Message-ID: <20200429155326.GD7560@paulmck-ThinkPad-P72> (raw)
In-Reply-To: <20200429132235.GA815283@mwanda>
On Wed, Apr 29, 2020 at 04:22:35PM +0300, Dan Carpenter wrote:
> 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>
Good catch! Talk about code sort of working by accident!!!
Thank you, and I folded this into the original commit with attribution.
Thanx, Paul
> ---
> 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
>
WARNING: multiple messages have this Message-ID (diff)
From: "Paul E. McKenney" <paulmck@kernel.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>,
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: Re: [PATCH] rcutorture: Fix error codes in rcu_torture_read_exit_init()
Date: Wed, 29 Apr 2020 08:53:26 -0700 [thread overview]
Message-ID: <20200429155326.GD7560@paulmck-ThinkPad-P72> (raw)
In-Reply-To: <20200429132235.GA815283@mwanda>
On Wed, Apr 29, 2020 at 04:22:35PM +0300, Dan Carpenter wrote:
> 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>
Good catch! Talk about code sort of working by accident!!!
Thank you, and I folded this into the original commit with attribution.
Thanx, Paul
> ---
> 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 prev parent reply other threads:[~2020-04-29 15:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-29 13:22 [PATCH] rcutorture: Fix error codes in rcu_torture_read_exit_init() Dan Carpenter
2020-04-29 13:22 ` Dan Carpenter
2020-04-29 15:53 ` Paul E. McKenney [this message]
2020-04-29 15:53 ` 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=20200429155326.GD7560@paulmck-ThinkPad-P72 \
--to=paulmck@kernel.org \
--cc=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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.