From nobody Sat Feb 7 14:53:37 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 EBEAB3112C9 for ; Tue, 27 Jan 2026 15:06:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769526366; cv=none; b=PxYRpmRVttSrDpupNO127XmWuwgPXuOb9/6bOkjYKynH7RubRiVM2OgotXjsq11oHZMN7Bwy0zeFRmryMyOWxmvMrCu92kkoGvRuehlg8aaf3MYoYMlCXguEfHSKE6M+OhcgTBNhTkdvcJEBhb90lebJIRxgMfnxUwLC8DRnKTs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769526366; c=relaxed/simple; bh=1F2GeyFoZht5dtnWbw33ntwDY2+SMhAOmStyZRAl73U=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=PvoUB/kOl+FWFB1SzEzrBN63jgyJzz/ku5lrrYePr2DromSYSP3uez9ee7FQf4SjV/i9EE65B66mszoj06OVdcq2N5z5wRkuo4PtLpddr4OlZpuqUvpTHrGcJRwk1dYRpME5U0OpMFkyniOMebFBicUOZIPibtgLRL6qE8G9zbc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=q9rkY/gB; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="q9rkY/gB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B389CC116C6; Tue, 27 Jan 2026 15:06:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769526365; bh=1F2GeyFoZht5dtnWbw33ntwDY2+SMhAOmStyZRAl73U=; h=Date:From:To:Cc:Subject:References:From; b=q9rkY/gBOih02mv2Pjeg+LxV2UUZ6g5d0ZAm1sgGD7YypjgabvpsLNWDq9qfuyegB NXlSmAoJ0FmVmEcMpTNBE1qbA/8A3zAYLTZeOzl39ODk7Av1YOMZzug6KcT5zMawpr ZNamrQLIH+EbvOilYgbJ2O/4UhjQ4YVTPkVMwCY+yR4N0ecmrG58oAAa3qQYxmaohg n1tvMH3ViRXm4YOn91r5zQI/0+VmAVUKVNpT7+w0ayd55m0LuU3LrbPQyfknNg9XlI Tkx2NbD9ODJhwADEDClLA4rSIomhpbI3Vzq+3I/wkJ/WOETUbjiWWZH0vy5J/gpMdN H0sbWdyULp7hw== Received: from rostedt by gandalf with local (Exim 4.99.1) (envelope-from ) id 1vkkdv-00000000Lac-2aE5; Tue, 27 Jan 2026 10:06:11 -0500 Message-ID: <20260127150611.473025749@kernel.org> User-Agent: quilt/0.68 Date: Tue, 27 Jan 2026 10:05:56 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , Tom Zanussi , Miaoqian Lin Subject: [for-next][PATCH 01/15] tracing: Properly process error handling in event_hist_trigger_parse() References: <20260127150555.840066272@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Miaoqian Lin Memory allocated with trigger_data_alloc() requires trigger_data_free() for proper cleanup. Replace kfree() with trigger_data_free() to fix this. Found via static analysis and code review. This isn't a real bug due to the current code basically being an open coded version of trigger_data_free() without the synchronization. The synchronization isn't needed as this is the error path of creation and there's nothing to synchronize against yet. Replace the kfree() to be consistent with the allocation. Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Tom Zanussi Link: https://patch.msgid.link/20251211100058.2381268-1-linmq006@gmail.com Fixes: e1f187d09e11 ("tracing: Have existing event_command.parse() implemen= tations use helpers") Signed-off-by: Miaoqian Lin Signed-off-by: Steven Rostedt (Google) --- kernel/trace/trace_events_hist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_h= ist.c index c97bb2fda5c0..7e50df8b800b 100644 --- a/kernel/trace/trace_events_hist.c +++ b/kernel/trace/trace_events_hist.c @@ -6911,7 +6911,7 @@ static int event_hist_trigger_parse(struct event_comm= and *cmd_ops, =20 remove_hist_vars(hist_data); =20 - kfree(trigger_data); + trigger_data_free(trigger_data); =20 destroy_hist_data(hist_data); goto out; --=20 2.51.0