Skip to content

Commit 4b6b08f

Browse files
Zqiang1211rostedt
authored andcommitted
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/[email protected] Cc: <[email protected]> Fixes: c8895e2 ("trace/osnoise: Support hotplug operations") Acked-by: Daniel Bristot de Oliveira <[email protected]> Signed-off-by: Qiang.Zhang <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent 5615e08 commit 4b6b08f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kernel/trace/trace_osnoise.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1548,7 +1548,7 @@ static int start_kthread(unsigned int cpu)
15481548
static int start_per_cpu_kthreads(struct trace_array *tr)
15491549
{
15501550
struct cpumask *current_mask = &save_cpumask;
1551-
int retval;
1551+
int retval = 0;
15521552
int cpu;
15531553

15541554
cpus_read_lock();
@@ -1568,13 +1568,13 @@ static int start_per_cpu_kthreads(struct trace_array *tr)
15681568
retval = start_kthread(cpu);
15691569
if (retval) {
15701570
stop_per_cpu_kthreads();
1571-
return retval;
1571+
break;
15721572
}
15731573
}
15741574

15751575
cpus_read_unlock();
15761576

1577-
return 0;
1577+
return retval;
15781578
}
15791579

15801580
#ifdef CONFIG_HOTPLUG_CPU

0 commit comments

Comments
 (0)