[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAP-5=fW_j_jisBsMw8AU0t3NgQdfE-ZBgqHN5y4ezA+bvRWW2g@mail.gmail.com>
Date: Wed, 26 Feb 2025 21:45:00 -0800
From: Ian Rogers <irogers@...gle.com>
To: Howard Chu <howardchu95@...il.com>
Cc: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>, Namhyung Kim <namhyung@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>,
Adrian Hunter <adrian.hunter@...el.com>, Kan Liang <kan.liang@...ux.intel.com>,
Yicong Yang <yangyicong@...ilicon.com>, James Clark <james.clark@...aro.org>,
"Dr. David Alan Gilbert" <linux@...blig.org>, Levi Yun <yeoreum.yun@....com>, Ze Gao <zegao2021@...il.com>,
Weilin Wang <weilin.wang@...el.com>, Xu Yang <xu.yang_2@....com>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 01/11] perf debug: Avoid stack overflow in recursive
error message
On Wed, Feb 26, 2025 at 9:40 PM Howard Chu <howardchu95@...il.com> wrote:
>
> Hi Ian,
>
> On Wed, Jan 8, 2025 at 11:51 PM Ian Rogers <irogers@...gle.com> wrote:
> >
> > In debug_file, pr_warning_once is called on error. As that function
> > calls debug_file the function will yield a stack overflow. Switch the
> > location of the call so the recursion is avoided.
>
> May I ask how it created the recursion? Too ignorant to understand sorry...
If _debug_file is NULL then debug_file calls pr_warning_once which
calls debug_file which calls pr_warning_once again, etc ... :-)
Thanks,
Ian
> Thanks,
> Howard
Powered by blists - more mailing lists