Re: [PATCH 1/2] tracing: Fix cpu buffers unavailable due to 'record_disabled' messed

From: Zheng Yejian
Date: Fri Aug 04 2023 - 21:58:20 EST


On 2023/8/5 00:51, Steven Rostedt wrote:
On Sat, 5 Aug 2023 00:41:13 +0800
kernel test robot <lkp@xxxxxxxxx> wrote:

5276 if (cpumask_test_cpu(cpu, tr->tracing_cpumask) &&
5277 !cpumask_test_cpu(cpu, tracing_cpumask_new)) {
5278 atomic_inc(&per_cpu_ptr(tr->array_buffer.data, cpu)->disabled);
5279 ring_buffer_record_disable_cpu(tr->array_buffer.buffer, cpu);
5280 ring_buffer_record_disable_cpu(tr->max_buffer.buffer, cpu);

The access to max_buffer requires a:

#ifdef CONFIG_TRACER_MAX_TRACE

Around them.

-- Steve

Thanks, Steve, I'll add it in v2.

-- Zheng Yejian


5281 }
5282 if (!cpumask_test_cpu(cpu, tr->tracing_cpumask) &&
5283 cpumask_test_cpu(cpu, tracing_cpumask_new)) {
5284 atomic_dec(&per_cpu_ptr(tr->array_buffer.data, cpu)->disabled);
5285 ring_buffer_record_enable_cpu(tr->array_buffer.buffer, cpu);
5286 ring_buffer_record_enable_cpu(tr->max_buffer.buffer, cpu);
5287 }
5288 }
5289 arch_spin_unlock(&tr->max_lock);