* Patch "tracing: Fix return value check in trace_benchmark_reg()" has been added to the 4.10-stable tree
@ 2017-03-12 16:26 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-03-12 16:26 UTC (permalink / raw)
To: weiyongjun1, gregkh, rostedt; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
tracing: Fix return value check in trace_benchmark_reg()
to the 4.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
tracing-fix-return-value-check-in-trace_benchmark_reg.patch
and it can be found in the queue-4.10 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 8f0994bb8cbde5452e58ce0cacdbf6cb58079d01 Mon Sep 17 00:00:00 2001
From: Wei Yongjun <weiyongjun1@huawei.com>
Date: Thu, 12 Jan 2017 13:55:02 +0000
Subject: tracing: Fix return value check in trace_benchmark_reg()
From: Wei Yongjun <weiyongjun1@huawei.com>
commit 8f0994bb8cbde5452e58ce0cacdbf6cb58079d01 upstream.
In case of error, the function kthread_run() returns ERR_PTR() and never
returns NULL. The NULL test in the return value check should be replaced
with IS_ERR().
Link: http://lkml.kernel.org/r/20170112135502.28556-1-weiyj.lk@gmail.com
Fixes: 81dc9f0e ("tracing: Add tracepoint benchmark tracepoint")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
kernel/trace/trace_benchmark.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/kernel/trace/trace_benchmark.c
+++ b/kernel/trace/trace_benchmark.c
@@ -175,9 +175,9 @@ int trace_benchmark_reg(void)
bm_event_thread = kthread_run(benchmark_event_kthread,
NULL, "event_benchmark");
- if (!bm_event_thread) {
+ if (IS_ERR(bm_event_thread)) {
pr_warning("trace benchmark failed to create kernel thread\n");
- return -ENOMEM;
+ return PTR_ERR(bm_event_thread);
}
return 0;
Patches currently in stable-queue which might be from weiyongjun1@huawei.com are
queue-4.10/tracing-fix-return-value-check-in-trace_benchmark_reg.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-03-12 17:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-12 16:26 Patch "tracing: Fix return value check in trace_benchmark_reg()" has been added to the 4.10-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).