From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 E8789432E89 for ; Thu, 13 Aug 2026 21:19:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786655961; cv=none; b=mYk5aaWuNCk4uSaCmDFuUMAdLlro0GOOST0uPZGX0CapUoLGROYsaSTCZEmjd+iguEs/Jlr1hRxTolvClxQs23L+PrAA+1ODW/tyIUeT7YeaP1ajHNuHKAd/PpHOKZLkYcrIftGatpFr/iQoeaSpv0Vi63GFEdmUAuYcblFQ8TQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786655961; c=relaxed/simple; bh=5L/iYefsklxU6iA6vmOvHlmoqmCohQQjdjBXeJg1rIE=; h=Message-ID:Date:From:To:Cc:Subject; b=mFTbD6uowXGife4KNrkSnWKSGI56YqiAqfKkgpKRaJkSagliK5p+Hfej9AVnfMWDKJ+eNu1OKcXIh+62XQrGYRXzqS2mso2bvS6BJUjspLji8CwOveqjk0b5hx0V52gpkW4asnzj4w23fHuJtuhha5CmOC2lMtuhRw+EQXtHGuA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CgPYYWJD; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CgPYYWJD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB2991F000E9; Thu, 13 Aug 2026 21:19:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786655949; bh=tl3pH+/SUfOxuYVbRoPNibFTnKSBIBXDuEHJ3NOELgE=; h=Date:From:To:Cc:Subject; b=CgPYYWJDHIf+DZu48EEcYk291d5Nr1sjvhV+DDWt5Z7fcwqejtKz0Aop1DJ0/SDpt QyjIl/1f8jGbnzxss1rS8BWqqX0JbMzNPdHSmAmai44Efzk4F4usW4AlW52ZaVJn+o JHV1DSQmnocD0KFjI0NJBYo6W7Tp9GSU3qRIsWFWp0/18fxghn0GrsbhtUwVSqptFS fNS8S5Szzjdhaw1oQXRAONsh5TGEFyXIljO2/C6x+UzxB5qMbfMVd2DxgiQ4w7sx0V OCLegNTGGGVlO9wkF3ORg4r2jyAUCZLk3HU/z2Nzp393XT/aRmYzhT2vmcyUx4i+xo jHFOzGo1yfX8w== Received: from rostedt by gandalf with local (Exim 4.99.4) (envelope-from ) id 1wucpi-00000003k8M-2Rlv; Thu, 13 Aug 2026 17:19:26 -0400 Message-ID: <20260813211913.824371874@kernel.org> User-Agent: quilt/0.69 Date: Thu, 13 Aug 2026 17:19:13 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton Subject: [for-linus][PATCH 0/2] tracing: Fixes for v7.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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. 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(-)