From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A56844A1399 for ; Thu, 13 Aug 2026 21:54:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=216.40.44.15 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786658067; cv=none; b=kQoqVdcudRUVw8i+eoIa8weRvyZeQd4kclG1jov3elSA5wZCQ2/yt7aq7lnOVo8T6FH8aVylf2nxGNKYmcNVDZGYibsO/rPFkFSNnbGhYXe3wp6YpygeicDe/m7nTRSBxfOX6tf8ISuE6yXOTtXrUMKarUCrrRMu7FmSPlfmGlQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786658067; c=relaxed/simple; bh=M2Vn5qpBCwYeN5xLQPnLabLEjf+wqV7tBqvYs+cnP3I=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type; b=SvCCsauxTSuP+IfaOikxlMerWq6ER2VDAtECmm1h+Rp3oIx6hYyoaiTFyJwsdyNY8a1QEQMdmUr0DyXtWZ1gYqIlrUHfgIvPm7T2gHUS4MCGbg8kqkyCxy+nw9ChsROvfny2t2UB4E5UCAlJOJERG0jF6+TsaW71ozjt1AdyPpA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=goodmis.org; spf=pass smtp.mailfrom=goodmis.org; dkim=pass (1024-bit key) header.d=goodmis.org header.i=@goodmis.org header.b=lhPxyQE8; arc=none smtp.client-ip=216.40.44.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=goodmis.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=goodmis.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=goodmis.org header.i=@goodmis.org header.b="lhPxyQE8" Received: from omf16.hostedemail.com (lb01a-stub [10.200.18.249]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 110411C0B47; Thu, 13 Aug 2026 21:54:21 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: rostedt@goodmis.org) by omf16.hostedemail.com (Postfix) with ESMTPA id 39EA620013; Thu, 13 Aug 2026 21:54:19 +0000 (UTC) Date: Thu, 13 Aug 2026 17:54:35 -0400 From: Steven Rostedt To: Linus Torvalds Cc: LKML , Masami Hiramatsu , Mathieu Desnoyers , Andrew Morton , Hui Su , Michael Wu Subject: [GIT PULL] tracing: Fixes for v7.2 Message-ID: <20260813175435.23a6e106@gandalf.local.home> X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Stat-Signature: nq6mqfo4ddzc7p35iein4ph7noqqush6 X-Rspamd-Server: rspamout04 X-Rspamd-Queue-Id: 39EA620013 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Session-ID: U2FsdGVkX1/CtAwsYk5OIUfhP9MT+CXgHNNbhZelQr0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=goodmis.org; h=date:from:to:cc:subject:message-id:mime-version:content-type:content-transfer-encoding; s=dkim1; bh=Gar0kBAS5AoEk2sOKvGITGsoM9XdI9zs+tndOFQbGn8=; b=lhPxyQE8LCcWJcoU/zz7S0Y2cOQg7wD78bO2Ny/2YIHDS+h6g+WMQLFMHAK0C9xg/59OvihUZedYkhnyaGIVWuOww5DGoOpNS9saIYE1Ejkkz6K1JyqnSj0XH6JYygmpf5Ml8DWNEvuYTJyr9MUw/arWwvc20tFxMyc+MBmmOPY= X-HE-Tag: 1786658059-831726 X-HE-Meta: U2FsdGVkX1/40BBsQ6gi5VQDljpTEXzTw6FwxyDxodj3wD9nki0N6xIWve0H2AluN6GgH2udclf83xzkalLaMZgZOwaVEOGSJvHUk98kY8U4a7VCIUEfbEdOUuxXhjyqx0lAVyreGPja4pa1s1a+q3VCPAwJNzf3fSpoqEmk4LhdVU87Bp1NPeei/8jI8g3ByMiyqzCMFUBYw2czMLr7mAUszVI8Mi/HYxWbS0SLIo6gON2ue0FVK6fwnZNrdFUTm9ZHMm8TZPEDX1IETZqPIrk1CLpm1obJQG75cwTXAY8pEu9yCir5taL45Z6m027EZzoQG+X3U0+zbN08fe6/gXZd6ebjVQul [ My ISP *finally* supports DKIM! So hopefully I will not end up in your spam folder again. ] Linus, 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 ':mod:'. If '' is not added, then it means to add all events in . 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. [ Note, the scan should only look at the module being loaded. I'm working on a patch to fix that for the next merge window. ] Please pull the latest trace-v7.2-rc7 tree, which can be found at: git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git trace-v7.2-rc7 Tag SHA1: ff59d39a1c59ea1eb204d56ec72f30c72059f303 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(-) --------------------------- diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index c01b10b99f67..3650d84d4f16 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c @@ -945,7 +945,7 @@ static int remove_cache_mod(struct trace_array *tr, const char *mod, if (strcmp(event_mod->module, mod) != 0) continue; - if (match && strcmp(event_mod->match, match) != 0) + if (match && (!event_mod->match || strcmp(event_mod->match, match) != 0)) continue; if (system && @@ -3566,6 +3566,7 @@ void trace_event_update_all(struct trace_eval_map **map, int len) int last_i; int i; + mutex_lock(&event_mutex); down_write(&trace_event_sem); list_for_each_entry_safe(call, p, &ftrace_events, list) { /* events are usually grouped together with systems */ @@ -3604,6 +3605,7 @@ void trace_event_update_all(struct trace_eval_map **map, int len) cond_resched(); } up_write(&trace_event_sem); + mutex_unlock(&event_mutex); } static bool event_in_systems(struct trace_event_call *call,