Skip to content

Commit

Permalink
trace: fix an incorrect __user annotation on stack_trace_sysctl
Browse files Browse the repository at this point in the history
No user pointers for sysctls anymore.

Fixes: 3292739 ("sysctl: pass kernel pointers to ->proc_handler")
Reported-by: build test robot <lkp@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Christoph Hellwig authored and Al Viro committed Jun 8, 2020
1 parent a2541dc commit 7ff0d44
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions include/linux/ftrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,8 @@ static inline void arch_ftrace_set_direct_caller(struct pt_regs *regs,

extern int stack_tracer_enabled;

int stack_trace_sysctl(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp,
loff_t *ppos);
int stack_trace_sysctl(struct ctl_table *table, int write, void *buffer,
size_t *lenp, loff_t *ppos);

/* DO NOT MODIFY THIS VARIABLE DIRECTLY! */
DECLARE_PER_CPU(int, disable_stack_tracer);
Expand Down
5 changes: 2 additions & 3 deletions kernel/trace/trace_stack.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,8 @@ static const struct file_operations stack_trace_filter_fops = {
#endif /* CONFIG_DYNAMIC_FTRACE */

int
stack_trace_sysctl(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp,
loff_t *ppos)
stack_trace_sysctl(struct ctl_table *table, int write, void *buffer,
size_t *lenp, loff_t *ppos)
{
int was_enabled;
int ret;
Expand Down

0 comments on commit 7ff0d44

Please sign in to comment.