From: Thomas Zimmermann <tzimmermann@suse.de>
To: Abdun Nihaal <nihaal@cse.iitm.ac.in>,
Helge Deller <deller@gmx.de>,
Javier Martinez Canillas <javierm@redhat.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Andrew Morton <akpm@linux-foundation.org>,
Sebastian Siewior <bigeasy@linutronix.de>,
Florian Tobias Schandinat <FlorianSchandinat@gmx.de>,
Ondrej Zary <linux@rainbow-software.org>,
Antonino Daplas <adaplas@gmail.com>,
Paul Mundt <lethal@linux-sh.org>,
Krzysztof Helt <krzysztof.h1@wp.pl>,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
Michal Januszewski <spock@gentoo.org>,
Heiko Schocher <hs@denx.de>, Peter Jones <pjones@redhat.com>
Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH 03/14] fbdev: metronomefb: fix potential memory leak in metronomefb_probe()
Date: Fri, 15 May 2026 09:18:35 +0200 [thread overview]
Message-ID: <fe8b3c7e-87fa-4f02-9cb8-835e0eb76dd3@suse.de> (raw)
In-Reply-To: <20260514-fbdev-v1-3-b3a2474fa720@cse.iitm.ac.in>
Am 14.05.26 um 10:24 schrieb Abdun Nihaal:
> 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 <nihaal@cse.iitm.ac.in>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
> drivers/video/fbdev/metronomefb.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/video/fbdev/metronomefb.c b/drivers/video/fbdev/metronomefb.c
> index 6f0942c6e5f1..83c614963a0a 100644
> --- a/drivers/video/fbdev/metronomefb.c
> +++ b/drivers/video/fbdev/metronomefb.c
> @@ -645,12 +645,14 @@ static int metronomefb_probe(struct platform_device *dev)
> info->flags = FBINFO_VIRTFB;
>
> info->fbdefio = &metronomefb_defio;
> - fb_deferred_io_init(info);
> + retval = fb_deferred_io_init(info);
> + if (retval)
> + goto err_free_irq;
>
> retval = fb_alloc_cmap(&info->cmap, 8, 0);
> if (retval < 0) {
> dev_err(&dev->dev, "Failed to allocate colormap\n");
> - goto err_free_irq;
> + goto err_fbdefio;
> }
>
> /* set cmap */
> @@ -673,6 +675,8 @@ static int metronomefb_probe(struct platform_device *dev)
>
> err_cmap:
> fb_dealloc_cmap(&info->cmap);
> +err_fbdefio:
> + fb_deferred_io_cleanup(info);
> err_free_irq:
> board->cleanup(par);
> err_csum_table:
>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
next prev parent reply other threads:[~2026-05-15 7:18 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-14 8:24 [PATCH 00/14] fbdev: fix various memory leaks Abdun Nihaal
2026-05-14 8:24 ` [PATCH 01/14] fbdev: hecubafb: fix potential memory leak in hecubafb_probe() Abdun Nihaal
2026-05-15 7:57 ` Thomas Zimmermann
2026-05-14 8:24 ` [PATCH 02/14] fbdev: broadsheetfb: fix potential memory leak in broadsheetfb_probe() Abdun Nihaal
2026-05-15 7:56 ` Thomas Zimmermann
2026-05-14 8:24 ` [PATCH 03/14] fbdev: metronomefb: fix potential memory leak in metronomefb_probe() Abdun Nihaal
2026-05-15 7:18 ` Thomas Zimmermann [this message]
2026-05-14 8:24 ` [PATCH 04/14] fbdev: radeon: fix potential memory leak in radeonfb_pci_register() Abdun Nihaal
2026-05-14 8:24 ` [PATCH 05/14] fbdev: carminefb: fix potential memory leak in alloc_carmine_fb() Abdun Nihaal
2026-05-14 8:24 ` [PATCH 06/14] fbdev: i740fb: fix potential memory leak in i740fb_probe() Abdun Nihaal
2026-05-14 8:24 ` [PATCH 07/14] fbdev: nvidia: fix potential memory leak in nvidiafb_probe() Abdun Nihaal
2026-05-14 8:24 ` [PATCH 08/14] fbdev: s3fb: fix potential memory leak in s3_pci_probe() Abdun Nihaal
2026-05-14 8:24 ` [PATCH 09/14] fbdev: tdfxfb: fix potential memory leak in tdfxfb_probe() Abdun Nihaal
2026-05-14 8:24 ` [PATCH 10/14] fbdev: tridentfb: fix potential memory leak in trident_pci_probe() Abdun Nihaal
2026-05-14 8:24 ` [PATCH 11/14] fbdev: uvesafb: fix potential memory leak in uvesafb_probe() Abdun Nihaal
2026-05-14 8:24 ` [PATCH 12/14] fbdev: efifb: fix memory leak in efifb_probe() Abdun Nihaal
2026-05-15 7:16 ` Thomas Zimmermann
2026-05-14 8:24 ` [PATCH 13/14] fbdev: vesafb: fix memory leak in vesafb_probe() Abdun Nihaal
2026-05-15 7:17 ` Thomas Zimmermann
2026-05-14 8:24 ` [PATCH 14/14] fbdev: sm501fb: fix potential memory leak in sm501fb_probe() Abdun Nihaal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fe8b3c7e-87fa-4f02-9cb8-835e0eb76dd3@suse.de \
--to=tzimmermann@suse.de \
--cc=FlorianSchandinat@gmx.de \
--cc=adaplas@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=bigeasy@linutronix.de \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=hs@denx.de \
--cc=javierm@redhat.com \
--cc=krzysztof.h1@wp.pl \
--cc=lethal@linux-sh.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rainbow-software.org \
--cc=nihaal@cse.iitm.ac.in \
--cc=pjones@redhat.com \
--cc=spock@gentoo.org \
--cc=stable@vger.kernel.org \
--cc=tomi.valkeinen@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.