From mboxrd@z Thu Jan 1 00:00:00 1970 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 91166359FBE; Fri, 9 Jan 2026 12:03:29 +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=1767960209; cv=none; b=t8DcGI9MakEQSHx9cTPPLoRaAvetSNalI3Zp6FBTX1uPTBhs1EtRnlS9EvnE5ABjLlWZNI0AhuuWmluuZJ/A6e3LQhW/69kwi6GSA1klXKDCAQDdmU4IVqSDk5P+hmldG34xJUPfcMwEVyStoaOQPfJ9CsODUEAZdJNXFK5eHpU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767960209; c=relaxed/simple; bh=GzylU9E0dUAIuMXPHs5Izd97XfNnL5jlRFUHXzpJnQo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ND7Ga1iiN1znLqRQ2lnI6pLEml/JpE3jjiygV/EPWlONpCvQOjrCkavxfDWyDn+waeNzauqdJNK/2n8lM6Xyj0ELN5XPmONSC7lrgp8h4sU4hvrWCm+Ab5jStJWBTQBwCudCe9ujzIjJMcKL389AA2VA90tlDtupvlJG3zz6IHo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=irQaS6W8; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="irQaS6W8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A6564C4CEF1; Fri, 9 Jan 2026 12:03:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767960209; bh=GzylU9E0dUAIuMXPHs5Izd97XfNnL5jlRFUHXzpJnQo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=irQaS6W8TQ2I5jq+HaofwNpUDg5pAnJ9Vy9Xy4FQox4PAiGnG5/bf5KNF1J6NAMNl nE7CElTN/aZid8MB2P1jV+d3f30K6UIVGohBMmEbVR93Gr/P5ia7ulDV5ETbMbwQIR hJDUTdyjtDpNn1bQkNihaZcbCs2HwdiwABvbSe0g= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Dmitry Antipov , syzbot+cfc7cab3bb6eaa7c4de2@syzkaller.appspotmail.com, Heming Zhao , Joseph Qi , Mark Fasheh , Joel Becker , Junxiao Bi , Changwei Ge , Jun Piao , Andrew Morton , Sasha Levin Subject: [PATCH 6.6 291/737] ocfs2: fix memory leak in ocfs2_merge_rec_left() Date: Fri, 9 Jan 2026 12:37:10 +0100 Message-ID: <20260109112144.958160839@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260109112133.973195406@linuxfoundation.org> References: <20260109112133.973195406@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dmitry Antipov [ Upstream commit 2214ec4bf89d0fd27717322d3983a2f3b469c7f3 ] In 'ocfs2_merge_rec_left()', do not reset 'left_path' to NULL after move, thus allowing 'ocfs2_free_path()' to free it before return. Link: https://lkml.kernel.org/r/20251205065159.392749-1-dmantipov@yandex.ru Fixes: 677b975282e4 ("ocfs2: Add support for cross extent block") Signed-off-by: Dmitry Antipov Reported-by: syzbot+cfc7cab3bb6eaa7c4de2@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=cfc7cab3bb6eaa7c4de2 Reviewed-by: Heming Zhao Acked-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Jun Piao Signed-off-by: Andrew Morton Signed-off-by: Sasha Levin --- fs/ocfs2/alloc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index e6191249169e6..af40f0da3a95c 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c @@ -3647,7 +3647,6 @@ static int ocfs2_merge_rec_left(struct ocfs2_path *right_path, * So we use the new rightmost path. */ ocfs2_mv_path(right_path, left_path); - left_path = NULL; } else ocfs2_complete_edge_insert(handle, left_path, right_path, subtree_index); -- 2.51.0