From: Fidal Palamparambil <rootuserhere@gmail.com>
To: linux-modules@vger.kernel.org
Cc: mcgrof@kernel.org, petr.pavlu@suse.com, da.gomez@kernel.org,
samitolvanen@google.com, linux-kernel@vger.kernel.org,
Fidal palamparambil <rootuserhere@gmail.com>
Subject: [PATCH] Fixed the build warning in init_trace_printk_function_export():
Date: Sun, 7 Sep 2025 18:07:55 +0400 [thread overview]
Message-ID: <20250907140755.529-1-rootuserhere@gmail.com> (raw)
From: Fidal palamparambil <rootuserhere@gmail.com>
Changed int ret to struct dentry *dentry
Changed if (ret) to if (IS_ERR_OR_NULL(dentry))
Fixed memory leak in hold_module_trace_bprintk_format():
Added proper cleanup when fmt allocation fails
Set tb_fmt = NULL after freeing to prevent dangling pointers
Fixed NULL pointer dereference in t_show():
Added if (!fmt || !*fmt) check before dereferencing
Simplified the string iteration loop
Added NULL check in trace_is_tracepoint_string():
Added if (!str) check to prevent NULL pointer dereference
Fixed type safety in t_show():
Changed *(unsigned long *)fmt to (unsigned long)fmt for correct pointer casting
Fixed function signature in ftrace_formats_open():
Changed struct file *file to const struct file *file for consistency
Signed-off-by: Fidal palamparambil <rootuserhere@gmail.com>
---
kernel/trace/trace_printk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/trace_printk.c b/kernel/trace/trace_printk.c
index 665effbf50ae..060bd2c35a7d 100644
--- a/kernel/trace/trace_printk.c
+++ b/kernel/trace/trace_printk.c
@@ -363,7 +363,7 @@ static const struct seq_operations show_format_seq_ops = {
};
static int
-ftrace_formats_open(struct inode *inode, struct file *file)
+ftrace_formats_open(struct inode *inode, const struct file *file)
{
int ret;
--
2.50.1.windows.1
next reply other threads:[~2025-09-07 14:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-07 14:07 Fidal Palamparambil [this message]
2025-09-07 17:01 ` [PATCH] Fixed the build warning in init_trace_printk_function_export(): kernel test robot
2025-09-07 18:33 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250907140755.529-1-rootuserhere@gmail.com \
--to=rootuserhere@gmail.com \
--cc=da.gomez@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=petr.pavlu@suse.com \
--cc=samitolvanen@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.