Skip to contentSkip to conversation

sbusfb: Initialize cmap.transp in FBIOPUTCMAP_SPARC

PATCH Applied Adam Kropelin 2 participants 2 messages Jun 6, 2004 – Jun 7, 2004 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sbusfb: Initialize cmap.transp in FBIOPUTCMAP_SPARC

When handling FBIOPUTCMAP_SPARC, sbusfb fails to initialize cmap.transp, which quickly leads to an oops when fb_set_cmap() dereferences it.

First encountered in Aurora Wombat kernels and seems to afflict mainline as well. Patch is against 2.6.7-rc2. xorg still fails to actually get anything to display on my CG6, but at least it no longer oopses the kernel.

drivers/video/sbuslib.c +1 -0
@@ -122,6 +122,7 @@
 		cmap.red = &red;
 		cmap.green = &green;
 		cmap.blue = &blue;
+		cmap.transp = NULL;
 		for (i = 0; i < count; i++) {
 			int err;
 
#1 lore raw
Quoted 8 lines · On Sun, 6 Jun 2004 01:06:29 -0400 Adam Kropelin <[email protected]>…

When handling FBIOPUTCMAP_SPARC, sbusfb fails to initialize cmap.transp, which quickly leads to an oops when fb_set_cmap() dereferences it.

First encountered in Aurora Wombat kernels and seems to afflict mainline as well. Patch is against 2.6.7-rc2. xorg still fails to actually get anything to display on my CG6, but at least it no longer oopses the kernel.

Applied, thanks a lot Adam.