From: Felipe W Damasio <felipewd@terra.com.br>
To: Felipe W Damasio <felipewd@terra.com.br>
Cc: Andrew Morton <akpm@osdl.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-fbdev-devel@lists.sourceforge.net
Subject: Re: [PATCH] Leak in vesafb
Date: Mon, 06 Oct 2003 18:38:22 -0300 [thread overview]
Message-ID: <3F81E0CE.2000908@terra.com.br> (raw)
In-Reply-To: <3F81DEE5.9000600@terra.com.br>
[-- Attachment #1: Type: text/plain, Size: 524 bytes --]
Felipe W Damasio wrote:
> Hi Andrew,
>
> Patch against 2.6.0-test6.
>
> Releases a previous request'ed_mem_region. Found by smatch.
>
> Since it didn't checked the return value of request_region, I'm not
> sure we should free it here...since (as it says on the driver), "vgacon
> probably has this region already".
>
> Andrew, I'd appreciate you could review this..
Also, this updated patch also iounmap fb_info.screen_base, since
we're about to return -EINVAL on vesa_init.
Cheers,
Felipe
[-- Attachment #2: vesafb-leak.patch --]
[-- Type: text/plain, Size: 543 bytes --]
--- linux-2.6.0-test6/drivers/video/vesafb.c.orig 2003-10-06 18:22:13.000000000 -0300
+++ linux-2.6.0-test6/drivers/video/vesafb.c 2003-10-06 18:33:39.000000000 -0300
@@ -366,8 +366,11 @@
fb_alloc_cmap(&fb_info.cmap, video_cmap_len, 0);
- if (register_framebuffer(&fb_info)<0)
+ if (register_framebuffer(&fb_info)<0) {
+ release_mem_region(vesafb_fix.smem_start, vesafb_fix.smem_len);
+ iounmap(fb_info.screen_base);
return -EINVAL;
+ }
printk(KERN_INFO "fb%d: %s frame buffer device\n",
fb_info.node, fb_info.fix.id);
prev parent reply other threads:[~2003-10-06 21:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-06 21:30 [PATCH] Leak in vesafb Felipe W Damasio
2003-10-06 21:38 ` Felipe W Damasio [this message]
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=3F81E0CE.2000908@terra.com.br \
--to=felipewd@terra.com.br \
--cc=akpm@osdl.org \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).