Skip to content

Commit 54fa9ba

Browse files
tklauserrostedt
authored andcommitted
ftrace: Let ftrace_enable_sysctl take a kernel pointer buffer
Commit 3292739 ("sysctl: pass kernel pointers to ->proc_handler") changed ctl_table.proc_handler to take a kernel pointer. Adjust the signature of ftrace_enable_sysctl to match ctl_table.proc_handler which fixes the following sparse warning: kernel/trace/ftrace.c:7544:43: warning: incorrect type in argument 3 (different address spaces) kernel/trace/ftrace.c:7544:43: expected void * kernel/trace/ftrace.c:7544:43: got void [noderef] __user *buffer Link: https://lkml.kernel.org/r/[email protected] Fixes: 3292739 ("sysctl: pass kernel pointers to ->proc_handler") Cc: Andrew Morton <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Al Viro <[email protected]> Signed-off-by: Tobias Klauser <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent 795d637 commit 54fa9ba

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

include/linux/ftrace.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ static inline int ftrace_mod_get_kallsym(unsigned int symnum, unsigned long *val
8585
extern int ftrace_enabled;
8686
extern int
8787
ftrace_enable_sysctl(struct ctl_table *table, int write,
88-
void __user *buffer, size_t *lenp,
89-
loff_t *ppos);
88+
void *buffer, size_t *lenp, loff_t *ppos);
9089

9190
struct ftrace_ops;
9291

kernel/trace/ftrace.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7534,8 +7534,7 @@ static bool is_permanent_ops_registered(void)
75347534

75357535
int
75367536
ftrace_enable_sysctl(struct ctl_table *table, int write,
7537-
void __user *buffer, size_t *lenp,
7538-
loff_t *ppos)
7537+
void *buffer, size_t *lenp, loff_t *ppos)
75397538
{
75407539
int ret = -ENODEV;
75417540

0 commit comments

Comments
 (0)