From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795015274; b=FTSKkInG5B0OVCceaDm0UAWQTs5szwWixTmnpWFH0IO+W0Yd4ymSC1biRDqoHWIOa331 oOR/UyDdEWCsDzgyEgNo7MiXIEe8kuqFFlIkDjzlnXbCfVeZDkM3vrik7RxG1qS+IzFvL KtcHtDiQKxxj/uUAlsJgW4XDj1JvKrOOmfNnxc3uOG5JfOFRPaAU7Rr9KjD8BySRUPHPV zyjoSuyN5mxyjrZfsUZt2DtKPUlF/AsM3ZXtVhAcupJvJFg3Lf/hqmY68wHNrPnLEOay9 FAsM4bD957vYDztje8AowEShJcKoF/gBES+JCuRX8g2U6jl8IfN2GinhmKxpWOKG0sg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795015274; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=3sblvstiAGQRq0r66W9wLaKyQ2puvlwblIhWZFkyK9Q=; b=D0FzqKOkVeS/3sCSvDTwJcKUVeRctOU9LWN/4AZPpD1ZkEZ4bc9sWWZ28ZVo3sR2CoRE 0fKdaQch3xc0Ht4bBEkThDOJk6bjaI/LBvUZU8YD/RAUsJM7AIUgLuF1nr9TQ7SGGX8RP dMrdzxDzz1lcKHL99t7XR1pG4O8sSzQ0i81Z+wBl85dwO3KuuJZ4ps7M/lYrjQe1xEpq8 GM01Tsnwfmvm7tQ4LgM2GM5jbNfJm9ubXjN/n8WCF1X/L32HLMHMPfwmrIu2oBBJOVLO5 tNcF7Caz/LreN9Ot5LKfU0phcFZcG/C0EkOq6UqS5cpCugWIwlKx7vBgWy2aauytjjg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=JbLR2bV2; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73E8D606A33B; Wed, 18 Nov 2026 15:21:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=JbLR2bV2 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 358141F000CF; Wed, 18 Nov 2026 15:21:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795015273; bh=3sblvstiAGQRq0r66W9wLaKyQ2puvlwblIhWZFkyK9Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=JbLR2bV2Tv6gUUHU9GEz8r24vfyvZUfCUybK/sDtmItxj5smOpMws2/XyKpS39OMT +wCxo9nK/h6sTJ0CTSWmibYd+pAOMZbctDLRQ9G1TbAaby3VRlpASzaak5zawnm3Ra MKQkpFs/41TSQokavZOFIk5b3lCW91g2gokzNjz8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, sashiko-bot , Ian Rogers , Stephane Eranian , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 7.3 0113/2651] perf jitdump: Free event in jit_repipe_code_move() Date: Wed, 18 Nov 2026 15:22:33 +0100 Message-ID: <20261118150251.951034486@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261118150247.972732815@linuxfoundation.org> References: <20261118150247.972732815@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnaldo Carvalho de Melo [ Upstream commit 7fc5851aac606b9e4143f6857710cc5f346770c5 ] jit_repipe_code_move() allocates a perf_event with calloc but never frees it — the 'out' label exits with only perf_sample__exit(). The sibling function jit_repipe_code_load() correctly calls free(event) at its out label. Add the same free(event) to jit_repipe_code_move(). Fixes: 9b07e27f88b9 ("perf inject: Add jitdump mmap injection support") Reported-by: sashiko-bot Reviewed-by: Ian Rogers Cc: Stephane Eranian Assisted-by: LLM Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/util/jitdump.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c index ae63366b86c6d..91aa1eea8229f 100644 --- a/tools/perf/util/jitdump.c +++ b/tools/perf/util/jitdump.c @@ -685,6 +685,7 @@ static int jit_repipe_code_move(struct jit_buf_desc *jd, union jr_entry *jr) build_id__mark_dso_hit(tool, event, &sample, jd->machine); out: perf_sample__exit(&sample); + free(event); return ret; } -- 2.53.0