Re: [PATCH 20/73] perf machine: Null-terminate version char array upon fgets(/proc/version) error

2019-05-20 Thread Arnaldo Carvalho de Melo
Em Fri, May 17, 2019 at 08:05:39PM -0400, Donald Yandt escreveu: > Thank you Arnaldo for signing my patch. > > I think we should use version 4 of my patch and return NULL instead of > null-terminating for efficiency. Please resubmit then, v3 is already upstream. - Arnaldo > Thanks, > >

Re: [PATCH 20/73] perf machine: Null-terminate version char array upon fgets(/proc/version) error

2019-05-17 Thread Donald Yandt
Thank you Arnaldo for signing my patch. I think we should use version 4 of my patch and return NULL instead of null-terminating for efficiency. Thanks, Donald > On May 17, 2019, at 3:35 PM, Arnaldo Carvalho de Melo wrote: > > From: Donald Yandt > > If fgets() fails due to any other

[PATCH 20/73] perf machine: Null-terminate version char array upon fgets(/proc/version) error

2019-05-17 Thread Arnaldo Carvalho de Melo
From: Donald Yandt If fgets() fails due to any other error besides end-of-file, the version char array may not even be null-terminated. Signed-off-by: Donald Yandt Cc: Alexander Shishkin Cc: Avi Kivity Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Yanmin Zhang Fixes: a1645ce12adb ("perf: 'perf