On 2025/9/6 3:39, Steven Rostedt wrote:
On Wed, 3 Sep 2025 12:15:16 +0800
Pu Lehui <pule...@huawei.com> wrote:

As for this fault injection syzkaller issue, shall we need to silence
it? How about the below fix?

I usually don't care about fault injections because it causes "faults" that
would only happen if the system was about to crash. But anyway..

agree!



diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index e6b50b416e63..c17c031e7917 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -834,7 +834,11 @@ int trace_pid_write(struct trace_pid_list
*filtered_pids,
                  /* copy the current bits to the new max */
                  ret = trace_pid_list_first(filtered_pids, &pid);
                  while (!ret) {
-                       trace_pid_list_set(pid_list, pid);
+                       ret = trace_pid_list_set(pid_list, pid);
+                       if (ret) {
+                               trace_parser_put(&parser);
+                               return ret;
+                       }

make it:

                        if (ret < 0)
                                goto out;

                          ret = trace_pid_list_next(filtered_pids, pid +
1, &pid);
                          nr_pids++;
                  }

And put the out label just before the trace_parser_put().

Oh, and add one space before the "out:" label. That makes diffs of patches
show the function when changes are after the label and not the label itself.

Looks like an interesting ops. Will do


-- Steve


Reply via email to