[Devel] [PATCH RHEL9 COMMIT] ms/tracing/osnoise: Fix missed cpus_read_unlock() in start_per_cpu_kthreads()
Konstantin Khorenko
khorenko at virtuozzo.com
Tue Jan 11 13:26:32 MSK 2022
The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh9-5.14.0-4.vz9.10.38
------>
commit 3d61c9b5d65577a1b1c1a7191fc47a8853f04d96
Author: Qiang.Zhang <qiang.zhang at windriver.com>
Date: Tue Aug 31 10:29:19 2021 +0800
ms/tracing/osnoise: Fix missed cpus_read_unlock() in start_per_cpu_kthreads()
When start_kthread() return error, the cpus_read_unlock() need
to be called.
Link: https://lkml.kernel.org/r/20210831022919.27630-1-qiang.zhang@windriver.com
Cc: <stable at vger.kernel.org>
msFixes: c8895e271f79 ("trace/osnoise: Support hotplug operations")
Acked-by: Daniel Bristot de Oliveira <bristot at kernel.org>
Signed-off-by: Qiang.Zhang <qiang.zhang at windriver.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt at goodmis.org>
(cherry picked from ms commit 4b6b08f2e45edda4c067ac40833e3c1f84383c0b)
Signed-off-by: Nikita Yushchenko <nikita.yushchenko at virtuozzo.com>
---
kernel/trace/trace_osnoise.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c
index 624419da31eb..43acd168c06f 100644
--- a/kernel/trace/trace_osnoise.c
+++ b/kernel/trace/trace_osnoise.c
@@ -1548,7 +1548,7 @@ static int start_kthread(unsigned int cpu)
static int start_per_cpu_kthreads(struct trace_array *tr)
{
struct cpumask *current_mask = &save_cpumask;
- int retval;
+ int retval = 0;
int cpu;
get_online_cpus();
@@ -1568,13 +1568,13 @@ static int start_per_cpu_kthreads(struct trace_array *tr)
retval = start_kthread(cpu);
if (retval) {
stop_per_cpu_kthreads();
- return retval;
+ break;
}
}
put_online_cpus();
- return 0;
+ return retval;
}
#ifdef CONFIG_HOTPLUG_CPU
More information about the Devel
mailing list