From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: weiyj_lk@163.com
Cc: Josh Triplett <josh@joshtriplett.org>,
Steven Rostedt <rostedt@goodmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Lai Jiangshan <jiangshanlai@gmail.com>,
Wei Yongjun <yongjun_wei@trendmicro.com.cn>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] rcutorture: Fix error return code in rcu_perf_init()
Date: Mon, 13 Jun 2016 09:52:13 -0700 [thread overview]
Message-ID: <20160613165212.GB3923@linux.vnet.ibm.com> (raw)
In-Reply-To: <1465831239-23815-1-git-send-email-weiyj_lk@163.com>
On Mon, Jun 13, 2016 at 03:20:39PM +0000, weiyj_lk@163.com wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Fix to return a negative error code -ENOMEM from kcalloc() error
> handling case instead of 0, as done elsewhere in this function.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Good eyes! Queued for review and testing.
Thanx, Paul
> ---
> kernel/rcu/rcuperf.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/rcu/rcuperf.c b/kernel/rcu/rcuperf.c
> index 7b2dbdf..d38ab08 100644
> --- a/kernel/rcu/rcuperf.c
> +++ b/kernel/rcu/rcuperf.c
> @@ -638,8 +638,10 @@ rcu_perf_init(void)
> writer_durations[i] =
> kcalloc(MAX_MEAS, sizeof(*writer_durations[i]),
> GFP_KERNEL);
> - if (!writer_durations[i])
> + if (!writer_durations[i]) {
> + firsterr = -ENOMEM;
> goto unwind;
> + }
> firsterr = torture_create_kthread(rcu_perf_writer, (void *)i,
> writer_tasks[i]);
> if (firsterr)
>
>
prev parent reply other threads:[~2016-06-13 16:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-13 15:20 [PATCH -next] rcutorture: Fix error return code in rcu_perf_init() weiyj_lk
2016-06-13 16:52 ` Paul E. McKenney [this message]
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=20160613165212.GB3923@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=jiangshanlai@gmail.com \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=rostedt@goodmis.org \
--cc=weiyj_lk@163.com \
--cc=yongjun_wei@trendmicro.com.cn \
/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