]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Jul 2023 06:33:21 +0000 (08:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Jul 2023 06:33:21 +0000 (08:33 +0200)
added patches:
tracing-histograms-return-an-error-if-we-fail-to-add-histogram-to-hist_vars-list.patch

queue-5.4/series
queue-5.4/tracing-histograms-return-an-error-if-we-fail-to-add-histogram-to-hist_vars-list.patch [new file with mode: 0644]

index b330796c44d256b75c6248581541b3f44827bbf6..fc7f0f8bae8fd6c9786a97cba20ce95de78382a5 100644 (file)
@@ -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 (file)
index 0000000..aeb138f
--- /dev/null
@@ -0,0 +1,38 @@
+From 4b8b3905165ef98386a3c06f196c85d21292d029 Mon Sep 17 00:00:00 2001
+From: Mohamed Khalfella <mkhalfella@purestorage.com>
+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 <mkhalfella@purestorage.com>
+
+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 <mkhalfella@purestorage.com>
+Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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;
+       }