Skip to content

Commit 7ff0d44

Browse files
Christoph HellwigAl Viro
authored andcommitted
trace: fix an incorrect __user annotation on stack_trace_sysctl
No user pointers for sysctls anymore. Fixes: 3292739 ("sysctl: pass kernel pointers to ->proc_handler") Reported-by: build test robot <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent a2541dc commit 7ff0d44

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

include/linux/ftrace.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,8 @@ static inline void arch_ftrace_set_direct_caller(struct pt_regs *regs,
319319

320320
extern int stack_tracer_enabled;
321321

322-
int stack_trace_sysctl(struct ctl_table *table, int write,
323-
void __user *buffer, size_t *lenp,
324-
loff_t *ppos);
322+
int stack_trace_sysctl(struct ctl_table *table, int write, void *buffer,
323+
size_t *lenp, loff_t *ppos);
325324

326325
/* DO NOT MODIFY THIS VARIABLE DIRECTLY! */
327326
DECLARE_PER_CPU(int, disable_stack_tracer);

kernel/trace/trace_stack.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -515,9 +515,8 @@ static const struct file_operations stack_trace_filter_fops = {
515515
#endif /* CONFIG_DYNAMIC_FTRACE */
516516

517517
int
518-
stack_trace_sysctl(struct ctl_table *table, int write,
519-
void __user *buffer, size_t *lenp,
520-
loff_t *ppos)
518+
stack_trace_sysctl(struct ctl_table *table, int write, void *buffer,
519+
size_t *lenp, loff_t *ppos)
521520
{
522521
int was_enabled;
523522
int ret;

0 commit comments

Comments
 (0)