* [PATCH] Leak in vesafb
@ 2003-10-06 21:30 Felipe W Damasio
2003-10-06 21:38 ` Felipe W Damasio
0 siblings, 1 reply; 2+ messages in thread
From: Felipe W Damasio @ 2003-10-06 21:30 UTC (permalink / raw)
To: Andrew Morton; +Cc: Linux Kernel Mailing List, linux-fbdev-devel
[-- Attachment #1: Type: text/plain, Size: 349 bytes --]
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..
Thanks.
Felipe
[-- Attachment #2: vesafb-leak.patch --]
[-- Type: text/plain, Size: 510 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:23:35.000000000 -0300
@@ -366,8 +366,10 @@
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);
return -EINVAL;
+ }
printk(KERN_INFO "fb%d: %s frame buffer device\n",
fb_info.node, fb_info.fix.id);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Leak in vesafb
2003-10-06 21:30 [PATCH] Leak in vesafb Felipe W Damasio
@ 2003-10-06 21:38 ` Felipe W Damasio
0 siblings, 0 replies; 2+ messages in thread
From: Felipe W Damasio @ 2003-10-06 21:38 UTC (permalink / raw)
To: Felipe W Damasio
Cc: Andrew Morton, Linux Kernel Mailing List, linux-fbdev-devel
[-- 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);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-10-06 21:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-06 21:30 [PATCH] Leak in vesafb Felipe W Damasio
2003-10-06 21:38 ` Felipe W Damasio
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).