From: Greg Kroah-Hartman Date: Wed, 21 Feb 2024 11:31:07 +0000 (+0100) Subject: 6.6-stable patches X-Git-Tag: v4.19.307~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c2621b119cf7d40edb610e7d4fc29570038b427a;p=thirdparty%2Fkernel%2Fstable-queue.git 6.6-stable patches added patches: tracing-fix-a-null-vs-is_err-bug-in-event_subsystem_dir.patch tracing-make-system_callback-function-static.patch --- diff --git a/queue-6.6/series b/queue-6.6/series index c0e88c25de8..c25a4f8fedb 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -334,3 +334,5 @@ nilfs2-fix-potential-bug-in-end_buffer_async_write.patch dm-limit-the-number-of-targets-and-parameter-size-area.patch x86-barrier-do-not-serialize-msr-accesses-on-amd.patch documentation-arch-ia64-features.rst-fix-kernel-feat-directive.patch +tracing-make-system_callback-function-static.patch +tracing-fix-a-null-vs-is_err-bug-in-event_subsystem_dir.patch diff --git a/queue-6.6/tracing-fix-a-null-vs-is_err-bug-in-event_subsystem_dir.patch b/queue-6.6/tracing-fix-a-null-vs-is_err-bug-in-event_subsystem_dir.patch new file mode 100644 index 00000000000..f29197b608c --- /dev/null +++ b/queue-6.6/tracing-fix-a-null-vs-is_err-bug-in-event_subsystem_dir.patch @@ -0,0 +1,34 @@ +From 5264a2f4bb3baf712e19f1f053caaa8d7d3afa2e Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Fri, 20 Oct 2023 16:52:45 +0300 +Subject: tracing: Fix a NULL vs IS_ERR() bug in event_subsystem_dir() + +From: Dan Carpenter + +commit 5264a2f4bb3baf712e19f1f053caaa8d7d3afa2e upstream. + +The eventfs_create_dir() function returns error pointers, it never returns +NULL. Update the check to reflect that. + +Link: https://lore.kernel.org/linux-trace-kernel/ff641474-84e2-46a7-9d7a-62b251a1050c@moroto.mountain + +Cc: Masami Hiramatsu +Fixes: 5790b1fb3d67 ("eventfs: Remove eventfs_file and just use eventfs_inode") +Signed-off-by: Dan Carpenter +Signed-off-by: Steven Rostedt (Google) +Signed-off-by: Greg Kroah-Hartman +--- + kernel/trace/trace_events.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/kernel/trace/trace_events.c ++++ b/kernel/trace/trace_events.c +@@ -2374,7 +2374,7 @@ event_subsystem_dir(struct trace_array * + nr_entries = ARRAY_SIZE(system_entries); + + ei = eventfs_create_dir(name, parent, system_entries, nr_entries, dir); +- if (!ei) { ++ if (IS_ERR(ei)) { + pr_warn("Failed to create system directory %s\n", name); + __put_system(system); + goto out_free; diff --git a/queue-6.6/tracing-make-system_callback-function-static.patch b/queue-6.6/tracing-make-system_callback-function-static.patch new file mode 100644 index 00000000000..1598e87e419 --- /dev/null +++ b/queue-6.6/tracing-make-system_callback-function-static.patch @@ -0,0 +1,32 @@ +From 5ddd8baa4857709b4e5d84b376d735152851955b Mon Sep 17 00:00:00 2001 +From: "Steven Rostedt (Google)" +Date: Thu, 5 Oct 2023 10:47:45 -0400 +Subject: tracing: Make system_callback() function static + +From: Steven Rostedt (Google) + +commit 5ddd8baa4857709b4e5d84b376d735152851955b upstream. + +The system_callback() function in trace_events.c is only used within that +file. The "static" annotation was missed. + +Fixes: 5790b1fb3d672 ("eventfs: Remove eventfs_file and just use eventfs_inode") +Reported-by: kernel test robot +Closes: https://lore.kernel.org/oe-kbuild-all/202310051743.y9EobbUr-lkp@intel.com/ +Signed-off-by: Steven Rostedt (Google) +Signed-off-by: Greg Kroah-Hartman +--- + kernel/trace/trace_events.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/kernel/trace/trace_events.c ++++ b/kernel/trace/trace_events.c +@@ -2302,7 +2302,7 @@ create_new_subsystem(const char *name) + return NULL; + } + +-int system_callback(const char *name, umode_t *mode, void **data, ++static int system_callback(const char *name, umode_t *mode, void **data, + const struct file_operations **fops) + { + if (strcmp(name, "filter") == 0)