[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACVxJT9ns2XGeE3FUwNT2J2Fn2s0YuHPQT-z6yg2RE8qzK-ssQ@mail.gmail.com>
Date: Thu, 22 Nov 2018 13:40:41 +0200
From: Alexey Dobriyan <adobriyan@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Yafang Shao <laoar.shao@...il.com>, viro@...iv.linux.org.uk,
keescook@...omium.org, orcunov@...nvz.org,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH] procfs: fix the output format in /proc/PID/wchan
On Wed, Nov 21, 2018 at 07:28:44PM -0800, Andrew Morton wrote:
> On Mon, 19 Nov 2018 19:17:52 +0800 Yafang Shao <laoar.shao@...il.com> wrote:
>
> > Just add the missing newline.
> >
> > ...
> >
> > --- a/fs/proc/base.c
> > +++ b/fs/proc/base.c
> > @@ -370,11 +370,12 @@ static int proc_pid_wchan(struct seq_file *m, struct pid_namespace *ns,
> > wchan = get_wchan(task);
> > if (wchan && !lookup_symbol_name(wchan, symname)) {
> > seq_puts(m, symname);
> > + seq_putc(m, '\n');
> > return 0;
> > }
> >
> > print0:
> > - seq_putc(m, '0');
> > + seq_puts(m, "0\n");
> > return 0;
> > }
> > #endif /* CONFIG_KALLSYMS */
>
> What is presently wrong with the wchan output? The changelog
> should explain such things, please.
It is just newline to make "cat /proc/*/wchan" output look cool.
But newline can break something.
Powered by blists - more mailing lists