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

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

index fb8c9dbbe5dd7f3f675cd9f67932c19e582e78b1..a51d0ce25d06cc74f9f3f936ccca2d9d1733b366 100644 (file)
@@ -215,3 +215,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-4.19/tracing-histograms-return-an-error-if-we-fail-to-add-histogram-to-hist_vars-list.patch b/queue-4.19/tracing-histograms-return-an-error-if-we-fail-to-add-histogram-to-hist_vars-list.patch
new file mode 100644 (file)
index 0000000..515fff4
--- /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
+@@ -5792,7 +5792,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;
+       }