lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250907140755.529-1-rootuserhere@gmail.com>
Date: Sun,  7 Sep 2025 18:07:55 +0400
From: Fidal Palamparambil <rootuserhere@...il.com>
To: linux-modules@...r.kernel.org
Cc: mcgrof@...nel.org,
	petr.pavlu@...e.com,
	da.gomez@...nel.org,
	samitolvanen@...gle.com,
	linux-kernel@...r.kernel.org,
	Fidal palamparambil <rootuserhere@...il.com>
Subject: [PATCH] Fixed the build warning in init_trace_printk_function_export():

From: Fidal palamparambil <rootuserhere@...il.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@...il.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ