Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'trace-ringbuffer-v6.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull tracing fix from Steven Rostedt:
"Ring-buffer fix: do not have boot-mapped buffers use CPU hotplug
callbacks

When a ring buffer is mapped to memory assigned at boot, it also
splits it up evenly between the possible CPUs. But the allocation code
still attached a CPU notifier callback to this ring buffer. When a CPU
is added, the callback will happen and another per-cpu buffer is
created for the ring buffer.

But for boot mapped buffers, there is no room to add another one (as
they were all created already). The result of calling the CPU hotplug
notifier on a boot mapped ring buffer is unpredictable and could lead
to a system crash.

If the ring buffer is boot mapped simply do not attach the CPU
notifier to it"

* tag 'trace-ringbuffer-v6.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
ring-buffer: Do not have boot mapped buffers hook to CPU hotplug

+6 -3
+6 -3
kernel/trace/ring_buffer.c
··· 2337 2337 if (!buffer->buffers[cpu]) 2338 2338 goto fail_free_buffers; 2339 2339 2340 - ret = cpuhp_state_add_instance(CPUHP_TRACE_RB_PREPARE, &buffer->node); 2341 - if (ret < 0) 2342 - goto fail_free_buffers; 2340 + /* If already mapped, do not hook to CPU hotplug */ 2341 + if (!start) { 2342 + ret = cpuhp_state_add_instance(CPUHP_TRACE_RB_PREPARE, &buffer->node); 2343 + if (ret < 0) 2344 + goto fail_free_buffers; 2345 + } 2343 2346 2344 2347 mutex_init(&buffer->mutex); 2345 2348