[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230411223206.0bc5794e@gandalf.local.home>
Date: Tue, 11 Apr 2023 22:32:06 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: "Tze-nan Wu (吳澤南)" <Tze-nan.Wu@...iatek.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-trace-kernel@...r.kernel.org"
<linux-trace-kernel@...r.kernel.org>,
"linux-mediatek@...ts.infradead.org"
<linux-mediatek@...ts.infradead.org>,
"Cheng-Jui Wang (王正睿)"
<Cheng-Jui.Wang@...iatek.com>,
"paulmck@...nel.org" <paulmck@...nel.org>,
wsd_upstream <wsd_upstream@...iatek.com>,
"Bobule Chang (張弘義)" <bobule.chang@...iatek.com>,
"stable@...r.kernel.org" <stable@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"mhiramat@...nel.org" <mhiramat@...nel.org>,
"angelogioacchino.delregno@...labora.com"
<angelogioacchino.delregno@...labora.com>,
"npiggin@...il.com" <npiggin@...il.com>
Subject: Re: [PATCH v3] ring-buffer: Prevent inconsistent operation on
cpu_buffer->resize_disabled
On Wed, 12 Apr 2023 02:27:53 +0000
Tze-nan Wu (吳澤南) <Tze-nan.Wu@...iatek.com> wrote:
> > > @@ -5368,7 +5372,7 @@ void ring_buffer_reset_online_cpus(struct
> > > trace_buffer *buffer)
> > > /* Make sure all commits have finished */
> > > synchronize_rcu();
> > >
> > > - for_each_online_buffer_cpu(buffer, cpu) {
> > > + for_each_cpu_and(cpu, buffer->cpumask, &reset_online_cpumask)
>
> Maybe we should use for_each_buffer_cpu(buffer, cpu) here?
> since a CPU may also came offline during synchronize_rcu().
Yeah, I guess that works too (not looking at the code at the moment though).
-- Steve
>
> > > {
> > > cpu_buffer = buffer->buffers[cpu];
> >
Powered by blists - more mailing lists