Thread (5 messages) 5 messages, 4 authors, 2006-09-27

Re: Fw: [Bugme-new] [Bug 7189] New: Inconsistent /proc/fb behavior

From: Jurij Smakov <hidden>
Date: 2006-09-27 07:39:41

On Tue, Sep 26, 2006 at 01:58:09PM -0700, Andrew Morton wrote:
On Sun, 24 Sep 2006 12:31:30 +0200 (CEST)
Geert Uytterhoeven [off-list ref] wrote:
[...]
quoted
[PATCH] Correct buffer size limit in fbmem_read_proc()

Signed-Off-By: Geert Uytterhoeven <geert@linux-m68k.org>
--- linux-2.6.18/drivers/video/fbmem.c.orig	2006-09-04 11:02:45.000000000 +0200
+++ linux-2.6.18/drivers/video/fbmem.c	2006-09-24 12:17:07.000000000 +0200
@@ -554,7 +554,8 @@ static int fbmem_read_proc(char *buf, ch
 	int clen;
 
 	clen = 0;
-	for (fi = registered_fb; fi < &registered_fb[FB_MAX] && len < 4000; fi++)
+	for (fi = registered_fb; fi < &registered_fb[FB_MAX] && clen < 4000;
+	     fi++)
 		if (*fi)
 			clen += sprintf(buf + clen, "%d %s\n",
 				        (*fi)->node,
Thanks.   Do we have confirmation that this patch fixes the bug?
Sorry for not replying sooner. Today I've built a 2.6.18 kernel with this patch 
and it did fix the problem. Grepping through /proc/fb now works as expected on my 
Sparc.

Best regards,
-- 
Jurij Smakov                                        jurij@wooyd.org
Key: http://www.wooyd.org/pgpkey/                   KeyID: C99E03CC

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help