From: Greg Kroah-Hartman Date: Mon, 24 Jul 2023 06:33:50 +0000 (+0200) Subject: 5.15-stable patches X-Git-Tag: v6.1.41~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=031ba7380d13b2d7d159c6e328c708d3dba5550a;p=thirdparty%2Fkernel%2Fstable-queue.git 5.15-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.15/series b/queue-5.15/series index 80a5759ddf2..0b34691e8a5 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -77,3 +77,4 @@ tcp-annotate-data-races-around-icsk-icsk_user_timeou.patch tcp-annotate-data-races-around-fastopenq.max_qlen.patch net-phy-prevent-stale-pointer-dereference-in-phy_ini.patch jbd2-recheck-chechpointing-non-dirty-buffer.patch +tracing-histograms-return-an-error-if-we-fail-to-add-histogram-to-hist_vars-list.patch diff --git a/queue-5.15/tracing-histograms-return-an-error-if-we-fail-to-add-histogram-to-hist_vars-list.patch b/queue-5.15/tracing-histograms-return-an-error-if-we-fail-to-add-histogram-to-hist_vars-list.patch new file mode 100644 index 00000000000..7db6d37c43c --- /dev/null +++ b/queue-5.15/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 +@@ -5949,7 +5949,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; + } +