From: Greg Kroah-Hartman Date: Thu, 16 Sep 2021 14:04:07 +0000 (+0200) Subject: 5.14-stable patches X-Git-Tag: v5.10.67~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9d15e2f6346ceea37d828d8d086917213f8474e7;p=thirdparty%2Fkernel%2Fstable-queue.git 5.14-stable patches added patches: tracing-osnoise-fix-missed-cpus_read_unlock-in-start_per_cpu_kthreads.patch --- diff --git a/queue-5.14/series b/queue-5.14/series index 609eb6c6bd3..002cf37e629 100644 --- a/queue-5.14/series +++ b/queue-5.14/series @@ -432,3 +432,4 @@ drm-ttm-fix-ttm_bo_move_memcpy-for-subclassed-struct-ttm_resource.patch drm-panfrost-simplify-lock_region-calculation.patch drm-panfrost-use-u64-for-size-in-lock_region.patch drm-panfrost-clamp-lock-region-to-bifrost-minimum.patch +tracing-osnoise-fix-missed-cpus_read_unlock-in-start_per_cpu_kthreads.patch diff --git a/queue-5.14/tracing-osnoise-fix-missed-cpus_read_unlock-in-start_per_cpu_kthreads.patch b/queue-5.14/tracing-osnoise-fix-missed-cpus_read_unlock-in-start_per_cpu_kthreads.patch new file mode 100644 index 00000000000..8b4c056cfa5 --- /dev/null +++ b/queue-5.14/tracing-osnoise-fix-missed-cpus_read_unlock-in-start_per_cpu_kthreads.patch @@ -0,0 +1,51 @@ +From 4b6b08f2e45edda4c067ac40833e3c1f84383c0b Mon Sep 17 00:00:00 2001 +From: "Qiang.Zhang" +Date: Tue, 31 Aug 2021 10:29:19 +0800 +Subject: tracing/osnoise: Fix missed cpus_read_unlock() in start_per_cpu_kthreads() + +From: Qiang.Zhang + +commit 4b6b08f2e45edda4c067ac40833e3c1f84383c0b 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: +Fixes: c8895e271f79 ("trace/osnoise: Support hotplug operations") +Acked-by: Daniel Bristot de Oliveira +Signed-off-by: Qiang.Zhang +Signed-off-by: Steven Rostedt (VMware) +Signed-off-by: Greg Kroah-Hartman +--- + kernel/trace/trace_osnoise.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/kernel/trace/trace_osnoise.c ++++ b/kernel/trace/trace_osnoise.c +@@ -1548,7 +1548,7 @@ static int start_kthread(unsigned int cp + 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 + retval = start_kthread(cpu); + if (retval) { + stop_per_cpu_kthreads(); +- return retval; ++ break; + } + } + + put_online_cpus(); + +- return 0; ++ return retval; + } + + #ifdef CONFIG_HOTPLUG_CPU