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 4EE4E401A38; Tue, 21 Jul 2026 17:15:08 +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=1784654109; cv=none; b=Vdy359O2g1kpz1fSTfJRwrKIQmyey+2ZM1DKt3EK9Bhbnt/LI1RiIoZCZkP9btCXYzpNESiEO98mK4bUIE5iBPDLvIwPO0TZNAflTHVP0wKZ26IKhshU/T7+34jrLC/x/drNnUgR6ynipgpPK4rxwO54evM8qye6/7fD20YcoEk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784654109; c=relaxed/simple; bh=D0ksDktUvM7I/iHPKiiI3mwuKnSnnbW9+vd2DHG8zYI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qAjyBQ6UmnFGnhYowVdGzR1qvNXjez7IhGrdpdwZk3CmZXfu7V3cPgRGpGcUKs4xY2Tx1aVx3Dae7eC/J0P/0+jr/tKooVn+OJ7RIjnCH8+RLmmomFkn661sQ48tnM2awHHPUeiQgqbBsUC+tnjOX7QRRo3hI/iAlIpN8WEF+ak= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mZRDyuDt; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="mZRDyuDt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E4751F000E9; Tue, 21 Jul 2026 17:15:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784654108; bh=UlnNjy0XNqCWUI4TqA2FSa0X3IvGwfrb2FCeEgA8wPA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=mZRDyuDtmgQKvh6iW5KgjoyffQU4D/m5WRhl07zEPax4Ig+DDN2WVmbP5q9XlrH27 MuyumqG2OKaaBD1XZpAjBsvAwRA0RA0g+6TM4j3w3v5dJlpOnBEddfwHPnJTz3veKN h3KJnJhsyr4hB/Er5GWbWP5tjXNc8bt8Hkg4ijFg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Abdun Nihaal , Thomas Zimmermann , Helge Deller Subject: [PATCH 7.1 1581/2077] fbdev: hecubafb: fix potential memory leak in hecubafb_probe() Date: Tue, 21 Jul 2026 17:20:54 +0200 Message-ID: <20260721152630.067107893@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152552.646164743@linuxfoundation.org> References: <20260721152552.646164743@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Abdun Nihaal commit cbef2a305a8a72969b86f96b7c07b86edde61aff upstream. The memory allocated for pagerefs in fb_deferred_io_init() is not freed on the error path. Fix it by calling fb_deferred_io_cleanup(). Fixes: 56c134f7f1b5 ("fbdev: Track deferred-I/O pages in pageref struct") Cc: stable@vger.kernel.org Signed-off-by: Abdun Nihaal Reviewed-by: Thomas Zimmermann Signed-off-by: Helge Deller Signed-off-by: Greg Kroah-Hartman --- drivers/video/fbdev/hecubafb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/drivers/video/fbdev/hecubafb.c +++ b/drivers/video/fbdev/hecubafb.c @@ -192,7 +192,9 @@ static int hecubafb_probe(struct platfor info->flags = FBINFO_VIRTFB; info->fbdefio = &hecubafb_defio; - fb_deferred_io_init(info); + retval = fb_deferred_io_init(info); + if (retval) + goto err_fbdefio; retval = register_framebuffer(info); if (retval < 0) @@ -209,6 +211,8 @@ static int hecubafb_probe(struct platfor return 0; err_fbreg: + fb_deferred_io_cleanup(info); +err_fbdefio: framebuffer_release(info); err_fballoc: vfree(videomemory);