]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Aug 2023 06:47:39 +0000 (08:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Aug 2023 06:47:39 +0000 (08:47 +0200)
added patches:
tracing-fix-trace_event_raw_event_synth-if-else-statement.patch

queue-5.15/series
queue-5.15/tracing-fix-trace_event_raw_event_synth-if-else-statement.patch [new file with mode: 0644]

index c189ec3b2ddd826632cb2410f4da3f877aab6b5c..a4b79cae4ea6ba5d99a2571f1a474eb9820b66bc 100644 (file)
@@ -145,3 +145,4 @@ dm-cache-policy-smq-ensure-io-doesn-t-prevent-cleaner-policy-progress.patch
 rbd-make-get_lock_owner_info-return-a-single-locker-or-null.patch
 rbd-harden-get_lock_owner_info-a-bit.patch
 rbd-retrieve-and-check-lock-owner-twice-before-blocklisting.patch
+tracing-fix-trace_event_raw_event_synth-if-else-statement.patch
diff --git a/queue-5.15/tracing-fix-trace_event_raw_event_synth-if-else-statement.patch b/queue-5.15/tracing-fix-trace_event_raw_event_synth-if-else-statement.patch
new file mode 100644 (file)
index 0000000..89143c4
--- /dev/null
@@ -0,0 +1,51 @@
+From 9971c3f944489ff7aacb9d25e0cde841a5f6018a Mon Sep 17 00:00:00 2001
+From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
+Date: Tue, 31 Jan 2023 09:52:37 -0500
+Subject: tracing: Fix trace_event_raw_event_synth() if else statement
+
+From: Steven Rostedt (Google) <rostedt@goodmis.org>
+
+commit 9971c3f944489ff7aacb9d25e0cde841a5f6018a upstream.
+
+The test to check if the field is a stack is to be done if it is not a
+string. But the code had:
+
+    } if (event->fields[i]->is_stack) {
+
+and not
+
+   } else if (event->fields[i]->is_stack) {
+
+which would cause it to always be tested. Worse yet, this also included an
+"else" statement that was only to be called if the field was not a string
+and a stack, but this code allows it to be called if it was a string (and
+not a stack).
+
+Also fixed some whitespace issues.
+
+Link: https://lore.kernel.org/all/202301302110.mEtNwkBD-lkp@intel.com/
+Link: https://lore.kernel.org/linux-trace-kernel/20230131095237.63e3ca8d@gandalf.local.home
+
+Cc: Tom Zanussi <zanussi@kernel.org>
+Fixes: 00cf3d672a9d ("tracing: Allow synthetic events to pass around stacktraces")
+Reported-by: kernel test robot <lkp@intel.com>
+Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
+Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ kernel/trace/trace_events_synth.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/kernel/trace/trace_events_synth.c
++++ b/kernel/trace/trace_events_synth.c
+@@ -557,8 +557,8 @@ static notrace void trace_event_raw_even
+                                          event->fields[i]->is_dynamic,
+                                          data_size, &n_u64);
+                       data_size += len; /* only dynamic string increments */
+-              } if (event->fields[i]->is_stack) {
+-                      long *stack = (long *)(long)var_ref_vals[val_idx];
++              } else if (event->fields[i]->is_stack) {
++                      long *stack = (long *)(long)var_ref_vals[val_idx];
+                       len = trace_stack(entry, event, stack,
+                                          data_size, &n_u64);