lkml.org 
[lkml]   [2023]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [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@mediatek.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];
> >

\
 
 \ /
  Last update: 2023-04-12 04:32    [W:1.436 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site