mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-17 12:44:10 +00:00
tracing/osnoise: Fix missed cpus_read_unlock() in start_per_cpu_kthreads()
commit4b6b08f2e4
upstream. 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@vger.kernel.org> Fixes:c8895e271f
("trace/osnoise: Support hotplug operations") Acked-by: Daniel Bristot de Oliveira <bristot@kernel.org> Signed-off-by: Qiang.Zhang <qiang.zhang@windriver.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
39cd7a4389
commit
5ecb17485a
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue