trace: fix an incorrect __user annotation on stack_trace_sysctl
authorChristoph Hellwig <hch@lst.de>
Wed, 3 Jun 2020 05:52:37 +0000 (07:52 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 8 Jun 2020 14:13:56 +0000 (10:13 -0400)
No user pointers for sysctls anymore.

Fixes: 32927393dc1c ("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>
include/linux/ftrace.h
kernel/trace/trace_stack.c

index ddfc377de0d2c14855bcc806c5d8f8d6b5178258..fce81238f304d3097400d7030a663e4feb938107 100644 (file)
@@ -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);
index c557f42a93971a96512fb90bb4e7be2f0e550b2a..98bba4764c5273d8b44f7d89c9dfa196436230ef 100644 (file)
@@ -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;