Loading fs/proc/base.c +6 −5 Original line number Original line Diff line number Diff line Loading @@ -234,7 +234,8 @@ static int proc_pid_auxv(struct seq_file *m, struct pid_namespace *ns, * Provides a wchan file via kallsyms in a proper one-value-per-file format. * Provides a wchan file via kallsyms in a proper one-value-per-file format. * Returns the resolved symbol. If that fails, simply return the address. * Returns the resolved symbol. If that fails, simply return the address. */ */ static int proc_pid_wchan(struct task_struct *task, char *buffer) static int proc_pid_wchan(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *task) { { unsigned long wchan; unsigned long wchan; char symname[KSYM_NAME_LEN]; char symname[KSYM_NAME_LEN]; Loading @@ -245,9 +246,9 @@ static int proc_pid_wchan(struct task_struct *task, char *buffer) if (!ptrace_may_access(task, PTRACE_MODE_READ)) if (!ptrace_may_access(task, PTRACE_MODE_READ)) return 0; return 0; else else return sprintf(buffer, "%lu", wchan); return seq_printf(m, "%lu", wchan); else else return sprintf(buffer, "%s", symname); return seq_printf(m, "%s", symname); } } #endif /* CONFIG_KALLSYMS */ #endif /* CONFIG_KALLSYMS */ Loading Loading @@ -2597,7 +2598,7 @@ static const struct pid_entry tgid_base_stuff[] = { DIR("attr", S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations), DIR("attr", S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations), #endif #endif #ifdef CONFIG_KALLSYMS #ifdef CONFIG_KALLSYMS INF("wchan", S_IRUGO, proc_pid_wchan), ONE("wchan", S_IRUGO, proc_pid_wchan), #endif #endif #ifdef CONFIG_STACKTRACE #ifdef CONFIG_STACKTRACE ONE("stack", S_IRUSR, proc_pid_stack), ONE("stack", S_IRUSR, proc_pid_stack), Loading Loading @@ -2935,7 +2936,7 @@ static const struct pid_entry tid_base_stuff[] = { DIR("attr", S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations), DIR("attr", S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations), #endif #endif #ifdef CONFIG_KALLSYMS #ifdef CONFIG_KALLSYMS INF("wchan", S_IRUGO, proc_pid_wchan), ONE("wchan", S_IRUGO, proc_pid_wchan), #endif #endif #ifdef CONFIG_STACKTRACE #ifdef CONFIG_STACKTRACE ONE("stack", S_IRUSR, proc_pid_stack), ONE("stack", S_IRUSR, proc_pid_stack), Loading Loading
fs/proc/base.c +6 −5 Original line number Original line Diff line number Diff line Loading @@ -234,7 +234,8 @@ static int proc_pid_auxv(struct seq_file *m, struct pid_namespace *ns, * Provides a wchan file via kallsyms in a proper one-value-per-file format. * Provides a wchan file via kallsyms in a proper one-value-per-file format. * Returns the resolved symbol. If that fails, simply return the address. * Returns the resolved symbol. If that fails, simply return the address. */ */ static int proc_pid_wchan(struct task_struct *task, char *buffer) static int proc_pid_wchan(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *task) { { unsigned long wchan; unsigned long wchan; char symname[KSYM_NAME_LEN]; char symname[KSYM_NAME_LEN]; Loading @@ -245,9 +246,9 @@ static int proc_pid_wchan(struct task_struct *task, char *buffer) if (!ptrace_may_access(task, PTRACE_MODE_READ)) if (!ptrace_may_access(task, PTRACE_MODE_READ)) return 0; return 0; else else return sprintf(buffer, "%lu", wchan); return seq_printf(m, "%lu", wchan); else else return sprintf(buffer, "%s", symname); return seq_printf(m, "%s", symname); } } #endif /* CONFIG_KALLSYMS */ #endif /* CONFIG_KALLSYMS */ Loading Loading @@ -2597,7 +2598,7 @@ static const struct pid_entry tgid_base_stuff[] = { DIR("attr", S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations), DIR("attr", S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations), #endif #endif #ifdef CONFIG_KALLSYMS #ifdef CONFIG_KALLSYMS INF("wchan", S_IRUGO, proc_pid_wchan), ONE("wchan", S_IRUGO, proc_pid_wchan), #endif #endif #ifdef CONFIG_STACKTRACE #ifdef CONFIG_STACKTRACE ONE("stack", S_IRUSR, proc_pid_stack), ONE("stack", S_IRUSR, proc_pid_stack), Loading Loading @@ -2935,7 +2936,7 @@ static const struct pid_entry tid_base_stuff[] = { DIR("attr", S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations), DIR("attr", S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations), #endif #endif #ifdef CONFIG_KALLSYMS #ifdef CONFIG_KALLSYMS INF("wchan", S_IRUGO, proc_pid_wchan), ONE("wchan", S_IRUGO, proc_pid_wchan), #endif #endif #ifdef CONFIG_STACKTRACE #ifdef CONFIG_STACKTRACE ONE("stack", S_IRUSR, proc_pid_stack), ONE("stack", S_IRUSR, proc_pid_stack), Loading