From: Greg Kroah-Hartman Date: Mon, 24 Jul 2023 06:33:21 +0000 (+0200) Subject: 5.4-stable patches X-Git-Tag: v6.1.41~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0f9889279d5f480691ab85a13beeaa7935191db9;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: tracing-histograms-return-an-error-if-we-fail-to-add-histogram-to-hist_vars-list.patch --- diff --git a/queue-5.4/series b/queue-5.4/series index b330796c44d..fc7f0f8bae8 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -311,3 +311,4 @@ tcp-annotate-data-races-around-tp-linger2.patch tcp-annotate-data-races-around-rskq_defer_accept.patch tcp-annotate-data-races-around-tp-notsent_lowat.patch tcp-annotate-data-races-around-fastopenq.max_qlen.patch +tracing-histograms-return-an-error-if-we-fail-to-add-histogram-to-hist_vars-list.patch diff --git a/queue-5.4/tracing-histograms-return-an-error-if-we-fail-to-add-histogram-to-hist_vars-list.patch b/queue-5.4/tracing-histograms-return-an-error-if-we-fail-to-add-histogram-to-hist_vars-list.patch new file mode 100644 index 00000000000..aeb138f3cd2 --- /dev/null +++ b/queue-5.4/tracing-histograms-return-an-error-if-we-fail-to-add-histogram-to-hist_vars-list.patch @@ -0,0 +1,38 @@ +From 4b8b3905165ef98386a3c06f196c85d21292d029 Mon Sep 17 00:00:00 2001 +From: Mohamed Khalfella +Date: Fri, 14 Jul 2023 20:33:41 +0000 +Subject: tracing/histograms: Return an error if we fail to add histogram to hist_vars list + +From: Mohamed Khalfella + +commit 4b8b3905165ef98386a3c06f196c85d21292d029 upstream. + +Commit 6018b585e8c6 ("tracing/histograms: Add histograms to hist_vars if +they have referenced variables") added a check to fail histogram creation +if save_hist_vars() failed to add histogram to hist_vars list. But the +commit failed to set ret to failed return code before jumping to +unregister histogram, fix it. + +Link: https://lore.kernel.org/linux-trace-kernel/20230714203341.51396-1-mkhalfella@purestorage.com + +Cc: stable@vger.kernel.org +Fixes: 6018b585e8c6 ("tracing/histograms: Add histograms to hist_vars if they have referenced variables") +Signed-off-by: Mohamed Khalfella +Signed-off-by: Steven Rostedt (Google) +Signed-off-by: Greg Kroah-Hartman +--- + kernel/trace/trace_events_hist.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/kernel/trace/trace_events_hist.c ++++ b/kernel/trace/trace_events_hist.c +@@ -6428,7 +6428,8 @@ static int event_hist_trigger_func(struc + goto out_unreg; + + if (has_hist_vars(hist_data) || hist_data->n_var_refs) { +- if (save_hist_vars(hist_data)) ++ ret = save_hist_vars(hist_data); ++ if (ret) + goto out_unreg; + } +