Re: + proc-wchan-use-printk-format-instead-of-lookup_symbol_name-fix.patch added to -mm tree

From: Alexey Dobriyan
Date: Mon Dec 28 2020 - 13:30:36 EST


On Tue, Dec 22, 2020 at 06:18:34PM -0800, akpm@xxxxxxxxxxxxxxxxxxxx wrote:
>
> proc-wchan-use-printk-format-instead-of-lookup_symbol_name-fix.patch

> --- a/fs/proc/base.c~proc-wchan-use-printk-format-instead-of-lookup_symbol_name-fix
> +++ a/fs/proc/base.c
> @@ -384,15 +384,8 @@ static const struct file_operations proc
> static int proc_pid_wchan(struct seq_file *m, struct pid_namespace *ns,
> struct pid *pid, struct task_struct *task)
> {
> - unsigned long wchan;
> -
> if (ptrace_may_access(task, PTRACE_MODE_READ_FSCREDS))
> - wchan = get_wchan(task);
> - else
> - wchan = 0;
> -
> - if (wchan)
> - seq_printf(m, "%ps", (void *) wchan);
> + seq_printf(m, "%ps", (void *)get_wchan(task));
> else
> seq_putc(m, '0');

These patches change '0' to '0x0'.

Also /proc/*/wchan shows '0' for everything which is strange.

I'm not sure if we should care as wchan is obsoleted by /proc/*/stack .