diff options
| author | Vincent Donnefort <vdonnefort@google.com> | 2026-04-01 06:36:59 +0100 |
|---|---|---|
| committer | Steven Rostedt (Google) <rostedt@goodmis.org> | 2026-04-02 13:19:09 -0400 |
| commit | 20ad8b0888be392eb2c4c3654805eb8594952373 (patch) | |
| tree | 4c411e860788af364c1336bb58a7e9dc0b496b8e /rust/kernel/interop/git@git.tavy.me:linux-stable.git | |
| parent | 23d1cfc0216e28140cb0c914814c03d127a3ad6e (diff) | |
ring-buffer: Enforce read ordering of trace_buffer cpumask and buffers
On CPU hotplug, if it is the first time a trace_buffer sees a CPU, a
ring_buffer_per_cpu will be allocated and its corresponding bit toggled
in the cpumask. Many readers check this cpumask to know if they can
safely read the ring_buffer_per_cpu but they are doing so without memory
ordering and may observe the cpumask bit set while having NULL buffer
pointer.
Enforce the memory read ordering by sending an IPI to all online CPUs.
The hotplug path is a slow-path anyway and it saves us from adding read
barriers in numerous call sites.
Link: https://patch.msgid.link/20260401053659.3458961-1-vdonnefort@google.com
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
Suggested-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'rust/kernel/interop/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions
