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: <20170710110521.600806-1-arnd@arndb.de>
Date:   Mon, 10 Jul 2017 13:04:56 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Steven Rostedt <rostedt@...dmis.org>,
        Ingo Molnar <mingo@...hat.com>
Cc:     Arnd Bergmann <arnd@...db.de>, linux-kernel@...r.kernel.org
Subject: [PATCH] ftrace: avoid unused-variable warning

When CONFIG_DYNAMIC_FTRACE is disabled, we get a harmless
compile-time warning:

kernel/trace/trace_stack.c: In function 'stack_trace_filter_open':
kernel/trace/trace_stack.c:412:21: error: unused variable 'ops' [-Werror=unused-variable]

We could replace the macros in linux/ftrace.h with inline functions,
which would solve this problem for all callers. However, as these
are only called internally in the ftrace code, it seems simpler
to change the caller instead.

Fixes: 0f17976568b3 ("ftrace: Fix regression with module command in stack_trace_filter")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 kernel/trace/trace_stack.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c
index b4a751e8f9d6..0ff29008383b 100644
--- a/kernel/trace/trace_stack.c
+++ b/kernel/trace/trace_stack.c
@@ -409,9 +409,7 @@ static const struct file_operations stack_trace_fops = {
 static int
 stack_trace_filter_open(struct inode *inode, struct file *file)
 {
-	struct ftrace_ops *ops = inode->i_private;
-
-	return ftrace_regex_open(ops, FTRACE_ITER_FILTER,
+	return ftrace_regex_open(inode->i_private, FTRACE_ITER_FILTER,
 				 inode, file);
 }
 
-- 
2.9.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ