Thread (12 messages) 12 messages, 4 authors, 2023-04-14

Re: [PATCH v3] ring-buffer: Prevent inconsistent operation on cpu_buffer->resize_disabled

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2023-04-12 02:32:17
Also in: linux-arm-kernel, linux-mediatek, lkml, stable

On Wed, 12 Apr 2023 02:27:53 +0000
Tze-nan Wu (吳澤南) [off-list ref] wrote:
quoted
quoted
@@ -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
quoted
quoted
{
              cpu_buffer = buffer->buffers[cpu];  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help