linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [FB PATCH] fix alpha boot oops
@ 2003-01-06  9:20 Richard Henderson
  0 siblings, 0 replies; only message in thread
From: Richard Henderson @ 2003-01-06  9:20 UTC (permalink / raw)
  To: linux-fbdev-devel; +Cc: linux-kernel, torvalds

Oops in fb_set_cmap caused by palette_cmap.transp uninitialized.
By inspection, fb_blank appears to have the same problem.


r~


===== fbmem.c 1.49 vs edited =====
--- 1.49/drivers/video/fbmem.c	Tue Dec 31 18:08:48 2002
+++ edited/fbmem.c	Mon Jan  6 01:07:03 2003
@@ -386,6 +386,7 @@
 	palette_cmap.red = palette_red;
 	palette_cmap.green = palette_green;
 	palette_cmap.blue = palette_blue;
+	palette_cmap.transp = NULL;
 
 	for (i = 0; i < LINUX_LOGO_COLORS; i += n) {
 		n = LINUX_LOGO_COLORS - i;
@@ -767,6 +768,7 @@
 int
 fb_blank(int blank, struct fb_info *info)
 {	
+	/* ??? Varible sized stack allocation.  */
 	u16 black[info->cmap.len];
 	struct fb_cmap cmap;
 	
@@ -775,8 +777,7 @@
 	if (blank) { 
 		memset(black, 0, info->cmap.len * sizeof(u16));
 		cmap.red = cmap.green = cmap.blue = black;
-		if (info->cmap.transp)
-			cmap.transp = black;
+		cmap.transp = info->cmap.transp ? black : NULL;
 		cmap.start = info->cmap.start;
 		cmap.len = info->cmap.len;
 	} else


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-01-06  9:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-06  9:20 [FB PATCH] fix alpha boot oops Richard Henderson

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).