mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [for-linus][PATCH 0/3] tracing: More fixes for 7.3
@ 2026-08-30  1:05 Steven Rostedt
  2026-08-30  1:05 ` [for-linus][PATCH 1/3] tracing/user_events: Clear copied tracing state before fork duplication Steven Rostedt
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Steven Rostedt @ 2026-08-30  1:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
	Vincent Donnefort

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1931 bytes --]

More fixes for 7.3:

- Clear user events state on fork in case of alloc failure

  On fork, the child gets a pointer to the parent's user events state. It
  makes a copy of it then updates the child's pointer to it. But if the
  allocation fails, the duplication function leaves the child with a pointer
  to its parent's descriptor. When the child cleans up its data, it will free
  the parent's descriptor while the parent is still using it.

  In the duplication function, set the child's user_event_mm to NULL before
  testing if the allocation succeeded, and when it exits it will not free
  the parent's descriptor.

- Fix retry exhaustion in simple ring buffer reader swap

  simple_ring_buffer_swap_reader_page() starts with retry set to 8 and
  post-decrements it only after a failed link replacement. On the final
  attempt, a successful replacement leaves retry at zero, while a failed
  replacement leaves it at -1.

  But the check for success expects the retry value to be non-zero and exits
  with an error on zero. This is the opposite result. Fix it.

- Fail nicely when the remote swap_reader_page() returns an error

  Currently, if the swap_reader_page() of a remote buffer fails, it triggers
  a WARN_ON_ONCE() and continues normally. Instead, have it exit with an
  error and a pr_warn() print instead of a full WARNING.

  git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
trace/fixes

Head SHA1: 5eab74874d11160725c42ab676ba97a797a362eb


Ivan Immanuel Shaji (2):
      tracing: Fix retry exhaustion in simple ring buffer reader swap
      ring-buffer: Stop remote reader update when page swap fails

Jérémy Jean (1):
      tracing/user_events: Clear copied tracing state before fork duplication

----
 kernel/trace/ring_buffer.c        | 7 +++++--
 kernel/trace/simple_ring_buffer.c | 4 ++--
 kernel/trace/trace_events_user.c  | 3 +++
 3 files changed, 10 insertions(+), 4 deletions(-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-08-30  1:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-30  1:05 [for-linus][PATCH 0/3] tracing: More fixes for 7.3 Steven Rostedt
2026-08-30  1:05 ` [for-linus][PATCH 1/3] tracing/user_events: Clear copied tracing state before fork duplication Steven Rostedt
2026-08-30  1:05 ` [for-linus][PATCH 2/3] tracing: Fix retry exhaustion in simple ring buffer reader swap Steven Rostedt
2026-08-30  1:05 ` [for-linus][PATCH 3/3] ring-buffer: Stop remote reader update when page swap fails Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®