All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: [for-linus][PATCH 0/2] tracing: Fixes for v7.2
Date: Thu, 13 Aug 2026 17:19:13 -0400	[thread overview]
Message-ID: <20260813211913.824371874@kernel.org> (raw)


tracing fixes for v7.2:

- Fix NULL pointer dereference when matching unloaded module wildcard event

  The set_event can take events for modules that have not been loaded
  yet. This is done by writing '<event>:mod:<module>'.

  If '<event>' is not added, then it means to add all events in <module>.
  This wildcard is represented by a NULL pointer. If one were to try to
  remove the same module item with a named event it would cause a NULL
  pointer dereference when comparing the NULL with the name in strcmp().

  echo ':mod:kvm' > /sys/kernel/tracing/set_event
  echo '!kvm_ack_irq:mod:kvm' >> /sys/kernel/tracing/set_event

  The above will do a strcmp("kvm_ack_irq", NULL) and crash the kernel.

  Test for NULL (wildcard) before doing the strcmp().

- Fix event data field race in loading two modules at the same time

  When a module loads, its trace events get registered. The fields
  of the events are also dynamically created and added to the events
  fields list. It also will call a function that will look at all the
  events for updates that need to be done. If two modules load at the
  same time, the one that scans all events and their fields may read
  the one being added as the scan doesn't take the event_mutex.
  This may cause a data race.

  Have the scan take the event_mutex to prevent the race.

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

Head SHA1: c3730b8373bb5059d735509b9e6a00d7eb337d7c


Hui Su (1):
      tracing: Fix NULL pointer dereference in module event cache removal

Michael Wu (1):
      tracing: Fix race between update_event_fields and, event_define_fields

----
 kernel/trace/trace_events.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

             reply	other threads:[~2026-08-13 21:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-13 21:19 Steven Rostedt [this message]
2026-08-13 21:19 ` [for-linus][PATCH 1/2] tracing: Fix NULL pointer dereference in module event cache removal Steven Rostedt
2026-08-13 21:19 ` [for-linus][PATCH 2/2] tracing: Fix race between update_event_fields and, event_define_fields Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260813211913.824371874@kernel.org \
    --to=rostedt@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.