[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YK/IDzRfX6AyTkbx@kernel.org>
Date: Thu, 27 May 2021 13:25:51 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Ian Rogers <irogers@...gle.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
linux-perf-users <linux-perf-users@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Riccardo Mancini <rickyman7@...il.com>,
Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH] perf: Move debug initialization earlier
Em Thu, May 27, 2021 at 08:51:41AM -0700, Ian Rogers escreveu:
> On Wed, May 19, 2021 at 9:44 AM Ian Rogers <irogers@...gle.com> wrote:
> >
> > This avoids segfaults during option handlers that use pr_err. For
> > example, "perf --debug nopager list" segfaults before this change.
> >
> > Fixes: 8abceacff87d (perf debug: Add debug_set_file function)
> > Signed-off-by: Ian Rogers <irogers@...gle.com>
>
> Ping.
I thought I had this one in, its now, will go to Linus probably tomorrow,
- Arnaldo
> Thanks!
> Ian
>
> > ---
> > tools/perf/perf.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/tools/perf/perf.c b/tools/perf/perf.c
> > index 20cb91ef06ff..2f6b67189b42 100644
> > --- a/tools/perf/perf.c
> > +++ b/tools/perf/perf.c
> > @@ -443,6 +443,8 @@ int main(int argc, const char **argv)
> > const char *cmd;
> > char sbuf[STRERR_BUFSIZE];
> >
> > + perf_debug_setup();
> > +
> > /* libsubcmd init */
> > exec_cmd_init("perf", PREFIX, PERF_EXEC_PATH, EXEC_PATH_ENVIRONMENT);
> > pager_init(PERF_PAGER_ENVIRONMENT);
> > @@ -531,8 +533,6 @@ int main(int argc, const char **argv)
> > */
> > pthread__block_sigwinch();
> >
> > - perf_debug_setup();
> > -
> > while (1) {
> > static int done_help;
> >
> > --
> > 2.31.1.751.gd2f1c929bd-goog
> >
--
- Arnaldo
Powered by blists - more mailing lists